diff --git a/.github/workflows/build-and-test-multiplatform.yml b/.github/workflows/build-and-test-multiplatform.yml
index 9f3d71d80f..e92fd15f32 100644
--- a/.github/workflows/build-and-test-multiplatform.yml
+++ b/.github/workflows/build-and-test-multiplatform.yml
@@ -6,9 +6,9 @@
name: Build and Test OCCT on Multiple Platforms
on:
- pull_request:
- branches:
- - '**'
+ # pull_request:
+ # branches:
+ # - '**'
push:
branches:
- 'master'
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
index ec257120cd..c4a5d5b783 100644
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -5,6 +5,9 @@
name: Build Documentation
on:
+ pull_request:
+ branches:
+ - '**'
push:
branches:
- 'master'
@@ -23,26 +26,26 @@ jobs:
choco install -y graphviz
choco install -y doxygen.install
- - name: Build refman documentation
- run: |
- set PATH=%PATH%;C:\Program Files\doxygen\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen
- cd adm
- bash gendoc -refman
- shell: cmd
-
- - name: Upload refman documentation
- uses: actions/upload-artifact@v4.4.3
- with:
- name: refman-doc
- path: doc/refman
- retention-days: 90
-
- - name: Upload generation log
- uses: actions/upload-artifact@v4.4.3
- with:
- name: doxygen.log
- path: doc/html_doxygen_err.log
- retention-days: 90
+ # - name: Build refman documentation
+ # run: |
+ # set PATH=%PATH%;C:\Program Files\doxygen\bin;C:\Program Files\Graphviz\bin;C:\Program Files\doxygen
+ # cd adm
+ # bash gendoc -refman
+ # shell: cmd
+
+ # - name: Upload refman documentation
+ # uses: actions/upload-artifact@v4.4.3
+ # with:
+ # name: refman-doc
+ # path: doc/refman
+ # retention-days: 90
+
+ # - name: Upload generation log
+ # uses: actions/upload-artifact@v4.4.3
+ # with:
+ # name: doxygen.log
+ # path: doc/html_doxygen_err.log
+ # retention-days: 90
- name: Build documentation Overview
run: |
diff --git a/dox/FILES_HTML.txt b/dox/FILES_HTML.txt
index fbfcb40d4c..114c914aaa 100644
--- a/dox/FILES_HTML.txt
+++ b/dox/FILES_HTML.txt
@@ -5,9 +5,9 @@
# The order of files in this list determines order of top-level pages
# in the generated documentation.
-introduction/introduction.md
+home.md
-samples/samples.md
+samples.md
../samples/mfc/standard/ReadMe.md
../samples/CSharp/ReadMe.md
../samples/CSharp/ReadMe_D3D.md
@@ -19,48 +19,48 @@ samples/samples.md
../samples/ios/UIKitSample/ReadMe.md
../samples/webgl/ReadMe.md
../samples/glfw/readme.md
-samples/ocaf.md
-samples/ocaf_func.md
-samples/draw_scripts.md
-samples/ais_object.md
+ocaf.md
+ocaf_func.md
+draw_scripts.md
+ais_object.md
-samples/novice_guide.md
-tutorial/tutorial.md
+novice_guide.md
+tutorial.md
-build/build_upgrade.md
-build/build_occt/building_occt.md
-build/build_3rdparty/building_3rdparty.md
-build/build_documentation/building_documentation.md
+build_upgrade.md
+building_occt.md
+building_3rdparty.md
+building_documentation.md
-debug/debug.md
-upgrade/upgrade.md
+debug.md
+upgrade.md
-user_guides/user_guides.md
-user_guides/foundation_classes/foundation_classes.md
-user_guides/modeling_data/modeling_data.md
-user_guides/modeling_algos/modeling_algos.md
-user_guides/mesh/mesh.md
-user_guides/shape_healing/shape_healing.md
-user_guides/visualization/visualization.md
-user_guides/iges/iges.md
-user_guides/step/step.md
-user_guides/xde/xde.md
-user_guides/de_wrapper/de_wrapper.md
-user_guides/ocaf/ocaf.md
-user_guides/draw_test_harness/draw_test_harness.md
-user_guides/inspector/inspector.md
-user_guides/vis/vis.md
+user_guides.md
+foundation_classes.md
+modeling_data.md
+modeling_algos.md
+mesh.md
+shape_healing.md
+visualization.md
+iges.md
+step.md
+xde.md
+de_wrapper.md
+ocaf.md
+draw_test_harness.md
+inspector.md
+vis.md
-specification/specification.md
-specification/boolean_operations/boolean_operations.md
-specification/brep_format.md
-specification/pbr_math.md
+specification.md
+boolean_operations.md
+brep_format.md
+pbr_math.md
-contribution/contribution.md
-contribution/documentation/documentation.md
-contribution/coding_rules.md
-contribution/contribution_workflow/contribution_workflow.md
-contribution/git_guide/git_guide.md
-contribution/tests/tests.md
+contribution.md
+documentation.md
+coding_rules.md
+contribution_workflow.md
+git_guide.md
+tests.md
license.md
diff --git a/dox/FILES_PDF.txt b/dox/FILES_PDF.txt
index e67ee8482f..fcf84b3c88 100644
--- a/dox/FILES_PDF.txt
+++ b/dox/FILES_PDF.txt
@@ -4,32 +4,32 @@
# Empty spaces are allowed.
# Strings starting with '#' are treated as comments and ignored.
-tutorial/tutorial.md
+tutorial.md
-samples/novice_guide.md
+novice_guide.md
-upgrade/upgrade.md
+upgrade.md
-user_guides/foundation_classes/foundation_classes.md
-user_guides/modeling_data/modeling_data.md
-user_guides/modeling_algos/modeling_algos.md
-user_guides/mesh/mesh.md
-user_guides/ocaf/ocaf.md
-user_guides/visualization/visualization.md
-user_guides/vis/vis.md
-user_guides/iges/iges.md
-user_guides/step/step.md
-user_guides/xde/xde.md
-user_guides/de_wrapper/de_wrapper.md
-user_guides/inspector/inspector.md
-user_guides/draw_test_harness/draw_test_harness.md
+foundation_classes.md
+modeling_data.md
+modeling_algos.md
+mesh.md
+ocaf.md
+visualization.md
+vis.md
+iges.md
+step.md
+xde.md
+de_wrapper.md
+inspector.md
+draw_test_harness.md
-contribution/contribution_workflow/contribution_workflow.md
-contribution/documentation/documentation.md
-contribution/coding_rules.md
-contribution/git_guide/git_guide.md
-contribution/tests/tests.md
+contribution_workflow.md
+documentation.md
+coding_rules.md
+git_guide.md
+tests.md
-specification/boolean_operations/boolean_operations.md
-specification/brep_format.md
-specification/pbr_math.md
+boolean_operations.md
+brep_format.md
+pbr_math.md
diff --git a/dox/introduction/introduction.md b/dox/Home.md
similarity index 88%
rename from dox/introduction/introduction.md
rename to dox/Home.md
index 51a23ffa08..2d7a8069e9 100644
--- a/dox/introduction/introduction.md
+++ b/dox/Home.md
@@ -1,11 +1,6 @@
-Introduction {#mainpage}
-========
+# Introduction
-@tableofcontents
-
-@htmlonly
@endhtmlonly
-@figure{/resources/occt_logo.png}
-@htmlonly@endhtmlonly
+
Welcome to Open CASCADE Technology (OCCT), a software development platform
providing services for 3D surface and solid modeling, CAD data exchange, and
@@ -13,12 +8,11 @@ visualization. Most of OCCT functionality is available in the form of C++
libraries. OCCT can be best applied in development of software dealing with 3D
modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
-@htmlonly@endhtmlonly
https://www.opencascade.com
-@figure{/resources/occ_logo.png}
-@htmlonly@endhtmlonly
-@section intro_overview Overview
+
+
+
Open CASCADE Technology (OCCT) is an object-oriented C++ class library designed for rapid production of sophisticated domain-specific CAD/CAM/CAE applications.
@@ -36,19 +30,19 @@ The C++ classes and other types are grouped into packages. Packages are organize
This modular structure is illustrated in the diagram below.
-@figure{/introduction/images/technical_overview_schema.png}
+
-* @ref intro_overview_fclasses "Foundation Classes" module underlies all other OCCT classes;
-* @ref intro_overview_moddata "Modeling Data" module supplies data structures to represent 2D and 3D geometric primitives and their compositions into CAD models;
-* @ref intro_overview_modalgo "Modeling Algorithms" module contains a vast range of geometrical and topological algorithms;
- * @ref intro_overview_mesh "Mesh" toolkit from "Modeling Algorithms" module implements tessellated representations of objects;
-* @ref intro_overview_visu "Visualization" module provides complex mechanisms for graphical data representation;
-* @ref intro_overview_de "Data Exchange" module inter-operates with popular data formats and relies on @ref intro_overview_heal "Shape Healing" to improve compatibility between CAD software of different vendors;
-* @ref intro_overview_ocaf "Application Framework" module offers ready-to-use solutions for handling application-specific data (user attributes) and commonly used functionality (save/restore, undo/redo, copy/paste, tracking CAD modifications, etc).
+* [Foundation Classes](#intro_overview_fclasses) module underlies all other OCCT classes;
+* [Modeling Data](#intro_overview_moddata) module supplies data structures to represent 2D and 3D geometric primitives and their compositions into CAD models;
+* [Modeling Algorithms](#intro_overview_modalgo) module contains a vast range of geometrical and topological algorithms;
+ * [Mesh](#intro_overview_mesh) toolkit from "Modeling Algorithms" module implements tessellated representations of objects;
+* [Visualization](#intro_overview_visu) module provides complex mechanisms for graphical data representation;
+* [Data Exchange](#intro_overview_de) module inter-operates with popular data formats and relies on [Shape Healing](#intro_overview_heal) to improve compatibility between CAD software of different vendors;
+* [Application Framework](#intro_overview_ocaf) module offers ready-to-use solutions for handling application-specific data (user attributes) and commonly used functionality (save/restore, undo/redo, copy/paste, tracking CAD modifications, etc).
-In addition, @ref intro_overview_draw "Open CASCADE Test Harness", also called Draw, provides an entry point to the library and can be used as a testing tool for its modules.
+In addition, [Open CASCADE Test Harness](#intro_overview_draw), also called Draw, provides an entry point to the library and can be used as a testing tool for its modules.
-@subsection intro_overview_fclasses Foundation Classes
+
**Foundation Classes** module contains data structures and services used by higher-level Open CASCADE Technology classes:
@@ -70,9 +64,9 @@ This module also provides a variety of general-purpose services, such as:
* Progress indication and user break interfaces, giving a possibility even for low-level algorithms to communicate with the user in a universal and convenient way;
* and many others...
-See the details in @ref occt_user_guides__foundation_classes "Foundation Classes User's Guide"
+See the details in [Foundation Classes User's Guide](foundation_classes#occt_user_guides__foundation_classes)
-@subsection intro_overview_moddata Modeling Data
+
**Modeling Data** supplies data structures to implement boundary representation (BRep) of objects in 3D.
In BRep the shape is represented as an aggregation of geometry within topology.
@@ -102,12 +96,12 @@ A shape, which is a basic topological entity, can be divided into components (su
Complex shapes can be defined as assemblies (compounds) of simpler entities.
-See the details in @ref occt_user_guides__modeling_data "Modeling Data User's Guide"
+See the details in [Modeling Data User's Guide](modeling_data#occt_user_guides__modeling_data)
3D geometric models can be stored in OCCT native BREP format.
-See @ref specification__brep_format "BREP Format Description White Paper" for details on the format.
+See [BREP Format Description White Paper](brep_format#specification__brep_format) for details on the format.
-@subsection intro_overview_modalgo Modeling Algorithms
+
**Modeling Algorithms** module groups a wide range of topological and geometric algorithms used in geometric modeling.
Basically, there are two groups of algorithms in Open CASCADE Technology:
@@ -143,14 +137,14 @@ Top-level API provides the following functionality:
* Pipes -- general-form sweeps;
* Lofting.
-@figure{/introduction/images/0001.png "Shapes containing pipes with variable radius produced by sweeping"}
+
* Boolean Operations, which allow creating new shapes from the combinations of source shapes. For two shapes *S1* and *S2*:
* *Common* contains all points that are in *S1* and *S2*;
* *Fuse* contains all points that are in *S1* or *S2*;
* *Cut* contains all points in that are in *S1* and not in *S2*.
-See @ref specification__boolean_operations "Boolean Operations" User's Guide for detailed documentation.
+See [Boolean Operations](boolean_operations#specification__boolean_operations) User's Guide for detailed documentation.
* Algorithms for local modifications such as:
* Hollowing;
@@ -160,11 +154,11 @@ See @ref specification__boolean_operations "Boolean Operations" User's Guide for
* Algorithms for creation of mechanical features, i.e. depressions, protrusions, ribs and grooves or slots along planar or revolution surfaces.
-@figure{/introduction/images/0004.png}
+
-See the details in @ref occt_user_guides__modeling_algos "Modeling Algorithms User's Guide".
+See the details in [Modeling Algorithms User's Guide](modeling_algos#occt_user_guides__modeling_algos).
-@subsection intro_overview_mesh Mesh
+
**Mesh** toolkit provides the functionality to work with tessellated representations of objects in form of triangular facets. This toolkit contains:
- data structures to store surface mesh data associated to shapes and basic algorithms to handle them;
@@ -175,9 +169,9 @@ Open CASCADE SAS also offers Advanced Mesh Products:
- Open CASCADE Mesh Framework (OMF)
- Express Mesh
-@figure{/introduction/images/0003.png}
+
-@subsection intro_overview_visu Visualization
+
**Visualization** module provides ready-to-use algorithms to create graphic presentations from various objects: shapes, meshes, etc.
@@ -203,27 +197,31 @@ Here are a few examples of OCCT Visualization features:
* Definition of clipping planes through the plane equation coefficients.
Ability to define visual attributes for cross-section at the level or individual clipping planes.
In the image below different parts of the rocket are clipped with different planes and hatched.
-@figure{/introduction/images/0008.png, "Display of shape cross-section and dimensions"}
+
+
* Support of built-in and application-specific GLSL shaders.
-@figure{/introduction/images/0013.png, "Fragment shader implementing custom clipping surface"}
+
+
* Optimization of rendering performance through the algorithms of:
* View frustum culling, which skips the presentation outside camera at the rendering stage;
* Back face culling, which reduces the rendered number of triangles and eliminates artifacts at shape boundaries.
* Real-time ray tracing technique using recursive Whitted's algorithm and Bounded Volume Hierarchy effective optimization structure.
-@figure{introduction/images/0002.png, "Real time visualization by ray tracing method"}
-@figure{introduction/images/0012.png, "Simulation of a glass cover"}
-For more details, see @ref occt_user_guides__visualization "Visualization User's Guide".
+
+
+
+
+For more details, see [Visualization User's Guide](visualization#occt_user_guides__visualization).
-The visualization of OCCT topological shapes by means of VTK library provided by VIS component is described in a separate @ref occt_user_guides__vis "VTK Integration Services" User's Guide.
+The visualization of OCCT topological shapes by means of VTK library provided by VIS component is described in a separate [VTK Integration Services](vis#occt_user_guides__vis) User's Guide.
-@subsection intro_overview_de Data Exchange
+
**Data Exchange** allows developing OCCT-based applications that can interact with other CAD systems by writing and reading CAD models to and from external data.
-@figure{/introduction/images/0014.png,"Shape imported from STEP"}
+
**Data Exchange** is organized in a modular way as a set of interfaces that comply with various CAD formats: IGES, STEP, STL, VRML, etc.
The interfaces allow software based on OCCT to exchange data with various CAD/PDM software packages, maintaining a good level of interoperability.
@@ -231,16 +229,16 @@ This module handles various problems of interoperability between CAD systems, ca
* **Standardized Data Exchange** interfaces allow querying and examining the input file, converting its contents to a CAD model and running validity checks on a fully translated shape.
The following formats are currently supported:
- * @ref occt_user_guides__step "STEP" (AP203: Mechanical Design, this covers General 3D CAD; AP214: Automotive Design; AP242).
- * @ref occt_iges_1 "IGES" (up to 5.3).
+ * [STEP](step#occt_user_guides__step) (AP203: Mechanical Design, this covers General 3D CAD; AP214: Automotive Design; AP242).
+ * [IGES](iges#occt_iges_1) (up to 5.3).
* **glTF** 2.0 reader and writer.
* **OBJ** mesh file reader and writer.
* **VRML** converter translates Open CASCADE shapes to VRML 1.0 files (Virtual Reality Modeling Language).
* **STL** converter translates Open CASCADE shapes to STL files.
STL (STtereoLithography) format is widely used for rapid prototyping (3D printing).
-* @ref occt_user_guides__xde "Extended data exchange" (XDE) allows translating additional attributes attached to geometric data (colors, layers, names, materials etc).
+* [Extended data exchange](xde#occt_user_guides__xde) (XDE) allows translating additional attributes attached to geometric data (colors, layers, names, materials etc).
* Advanced Data Exchange Components
- are available in addition to standard Data Exchange interfaces to support interoperability and data adaptation (also using @ref intro_overview_heal "Shape Healing") with CAD software using the following proprietary formats:
+ are available in addition to standard Data Exchange interfaces to support interoperability and data adaptation (also using [Shape Healing](#intro_overview_heal)) with CAD software using the following proprietary formats:
* ACIS SAT
* Parasolid
* DXF
@@ -249,7 +247,7 @@ This module handles various problems of interoperability between CAD systems, ca
These components are based on the same architecture as interfaces with STEP and IGES.
-@subsection intro_overview_heal Shape Healing
+
**Shape Healing** library provides algorithms to correct and adapt the geometry and topology of shapes imported to OCCT from other CAD systems.
@@ -281,9 +279,9 @@ Each sub-domain of Shape Healing has its own scope of functionality:
| Customization | Modifies the shape representation to fit specific needs. | The shape is not modified, only the mathematical form of its internal representation is changed. |
| Processing | Mechanism of shape modification via a user-editable resource file. | |
-For more details, refer to @ref occt_user_guides__shape_healing "Shape Healing User's guide".
+For more details, refer to [Shape Healing User's guide](shape_healing#occt_user_guides__shape_healing).
-@subsection intro_overview_ocaf Application Framework
+
**Open CASCADE Application Framework** (OCAF) handles Application Data basing on the Application/Document paradigm.
It uses an associativity engine to simplify the development of a CAD application thanks to the following ready-to-use features and services:
@@ -304,9 +302,9 @@ A shape object becomes the value of *Shape* attribute, in the same way as an int
OCAF organizes and embeds these attributes in a document. OCAF documents, in their turn, are managed by an OCAF application.
-For more details, see @ref occt_user_guides__ocaf "OCAF User's Guide".
+For more details, see [OCAF User's Guide](ocaf#occt_user_guides__ocaf).
-@subsection intro_overview_draw Draw Test Harness
+
**Test Harness** or **Draw** is a convenient testing tool for OCCT libraries.
It can be used to test and prototype various algorithms before building an entire application.
@@ -328,16 +326,16 @@ In addition, **Test Harness** provides commands to create and manipulate curves
You can add custom commands to test or demonstrate any new functionalities, which you develop.
-For more details, see @ref occt_user_guides__test_harness "Draw Test Harness Manual".
+For more details, see [Draw Test Harness Manual](draw_test_harness#occt_user_guides__test_harness).
-@section intro_req Requirements
+
Open CASCADE Technology is designed to be highly portable and is known to work on wide range of platforms.
Current version is officially certified on Windows (x86-64), Linux (x86-64), OS X / macOS (x86-64, arm64), Android (arm64), and iOS (arm64) platforms.
The tables below describe the recommended software configurations for which OCCT is certified to work.
-@subsection intro_req_cpp C++ Compiler / IDE
+
| OS | Compiler |
| --------- | ----------- |
@@ -349,7 +347,7 @@ The tables below describe the recommended software configurations for which OCCT
1) VC++ 141 64-bit is used for regular testing and for building binary package of official release of OCCT on Windows.
-@subsection intro_req_libs Third-party libraries and tools
+
The following third-party libraries and tools are not included in OCCT sources but are either required or can be optionally used for the indicated components of OCCT.
They are not needed if relevant component is not needed - it is possible building core OCCT modules without additional dependencies.
@@ -370,12 +368,12 @@ https://dev.opencascade.org/resources/download/3rd-party-components
| Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Updating STEP and ExprIntrp parsers |
| RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Reading glTF files |
| Draco 1.4.1+ | https://github.com/google/draco | Data Exchange | Reading compressed glTF files |
-| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpreter in Draw module |
+| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpretor in Draw module |
| Qt 5.3.2+ | https://www.qt.io/download/ | Inspector and Samples | Inspector Qt samples and |
| Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | (Re)generating documentation |
| Graphviz 2.38+ | https://graphviz.org/ | Documentation | Generating dependency graphs |
-@subsection intro_req_hw Hardware
+
| Component | Requirement |
| --------- | ----------- |
@@ -395,17 +393,17 @@ Therefore, if you observe some unexpected visual issues - first check for OpenGL
but beware that driver update might also come with new bugs.
Don't forget to report these bugs to vendors.
-@section intro_install Download and Installation
+
OCCT can be downloaded from https://dev.opencascade.org/release
In most cases you would want to rebuild OCCT from sources on your platform (OS, compiler) before
using it in your project, to ensure binary compatibility and appropriate configuration of the library.
-See @ref build_upgrade for instructions on building OCCT from sources on supported platforms.
+See [Link](build_upgrade#build_upgrade) for instructions on building OCCT from sources on supported platforms.
The following subsections describe how OCCT can be installed from ready-to-use packages on different platforms.
-@subsection intro_install_windows Windows
+
On Windows Open CASCADE Technology with binaries precompiled by Visual C++ 2017
can be installed using installation procedure available on official download page.
@@ -423,11 +421,11 @@ Full OCCT installation with reference documentation requires 1.8 Gb on disk.
When the installation is complete, you will find the directories for 3rd party products
(some might be absent in case of custom installation) and the main **OCCT** directory:
-@figure{/introduction/images/overview_3rdparty.png}
+
The contents of the OCCT-7.4.0 directory (called further "OCCT root", or $CASROOT) are as follows:
-@figure{/introduction/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;
@@ -443,18 +441,18 @@ The contents of the OCCT-7.4.0 directory (called further "OCCT root", or $CASROO
* **tools** This folder contains sources of Inspector tool.
* **win64/vc14** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2015;
-@subsection intro_install_linux Linux
+
OCCT is available as package "opencascade" in official repositories of many Linux distributions.
See https://repology.org/project/opencascade/versions for overview of available repositories.
-@subsection intro_install_mac macOS
+
On macOS, OCCT is available in Homebrew (https://formulae.brew.sh/formula/opencascade)
and MacPorts (https://ports.macports.org/port/opencascade/summary) repositories.
-@section intro_env Environment Variables
+
To run any Open CASCADE Technology application you need to set the environment variables.
@@ -511,13 +509,13 @@ The scripts are located in the OCCT root folder.
* **CSF_XmlOcafResource** is required in order to set the path to **XSD** resources, which defines XML grammar.
* **CSF_MIGRATION_TYPES** is required in order to read documents that contain old data types, such as *TDataStd_Shape*;
-@section intro_license License
+
Open CASCADE Technology and all materials, including this documentation, is
Copyright (c) 1999-2020 by OPEN CASCADE S.A.S. All rights reserved.
Open CASCADE Technology is free software; you can redistribute it and / or modify it under the terms of the
-@ref license_lgpl_21 "GNU Lesser General Public License (LGPL) version 2.1", with additional @ref occt_lgpl_exception "exception".
+[GNU Lesser General Public License (LGPL) version 2.1](license#license_lgpl_21), with additional [exception](license#occt_lgpl_exception).
Note that LGPL imposes some obligations on the application linked with Open CASCADE Technology.
If you wish to use OCCT in a proprietary application, please pay a special attention to address the requirements of LGPL section 6.
@@ -535,10 +533,10 @@ please contact Open CAS
Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
-materials is on you. See the @ref occt_public_license "license" text for formal
+materials is on you. See the [license](license#occt_public_license) text for formal
disclaimer.
-@section intro_acknowledge Acknowledgments
+
The following parties are acknowledged for producing tools which are used within
Open CASCADE Technology libraries or for release preparation.
diff --git a/dox/_Footer.md b/dox/_Footer.md
new file mode 100644
index 0000000000..163e067002
--- /dev/null
+++ b/dox/_Footer.md
@@ -0,0 +1,14 @@
+---
+
+## Navigation
+
+- [Home](Home)
+- [User Guides](user_guides)
+- [Specifications](specification)
+- [Contribution](contribution)
+- [Build and Upgrade](build_upgrade)
+- [Samples](samples)
+
+---
+
+© 2024 Open CASCADE Technology. All rights reserved.
\ No newline at end of file
diff --git a/dox/_Sidebar.md b/dox/_Sidebar.md
new file mode 100644
index 0000000000..dc0295f323
--- /dev/null
+++ b/dox/_Sidebar.md
@@ -0,0 +1,8 @@
+## Navigation
+
+- [Home](Home)
+- [User Guides](user_guides)
+- [Specifications](specification)
+- [Contribution](contribution)
+- [Build and Upgrade](build_upgrade)
+- [Samples](samples)
diff --git a/dox/samples/ais_object.md b/dox/ais_object.md
similarity index 62%
rename from dox/samples/ais_object.md
rename to dox/ais_object.md
index cf5a17e7c5..007fa53ac4 100644
--- a/dox/samples/ais_object.md
+++ b/dox/ais_object.md
@@ -1,15 +1,12 @@
-AIS: Custom Presentation {#tutorials__ais_object}
-========
+# AIS: Custom Presentation
-@tableofcontents
-
-@section intro Getting Started
+
OCCT provides a strong set of built-in Interactive Objects for rapid application development,
-but the real power and flexibility of **Application Interactive Services** (@c AIS) could be revealed by subclassing and implementing custom presentations.
-In this tutorial we will focus on the development of a custom @c AIS_InteractiveObject and show the basics step by step.
+but the real power and flexibility of **Application Interactive Services** (`AIS)` could be revealed by subclassing and implementing custom presentations.
+In this tutorial we will focus on the development of a custom `AIS_InteractiveObject` and show the basics step by step.
-Let's start from the very beginning and try subclassing @c AIS_InteractiveObject object:
+Let's start from the very beginning and try subclassing `AIS_InteractiveObject` object:
~~~~{.cpp}
class MyAisObject : public AIS_InteractiveObject
@@ -30,30 +27,30 @@ public:
};
~~~~
-@c DEFINE_STANDARD_RTTI_INLINE() macro will register the new class within the OCCT Run-Time Type Information (RTTI) system.
-This step is optional (you may skip it if you are not going to use methods like @c Standard_Transient::DynamicType() in application code), but it is a common practice while subclassing OCCT classes.
+`DEFINE_STANDARD_RTTI_INLINE()` macro will register the new class within the OCCT Run-Time Type Information (RTTI) system.
+This step is optional (you may skip it if you are not going to use methods like `Standard_Transient::DynamicType()` in application code), but it is a common practice while subclassing OCCT classes.
-The @c AIS_InteractiveObject interface defines only a couple of pure virtual methods - @c @::Compute() defining an object presentation and @c @::ComputeSelection() defining a selectable (pickable) volume.
+The `AIS_InteractiveObject` interface defines only a couple of pure virtual methods - `::Compute()` defining an object presentation and `::ComputeSelection()` defining a selectable (pickable) volume.
Selection and presentation are two independent mechanisms in **AIS**. Presentation rendering is done with help of OpenGL or a similar low-level graphics library, while selection doesn't depend on a graphic driver at all.
-Providing an empty implementation of these two methods would be enough for adding the object to @c AIS_InteractiveContext (@c @::Display()), but obviously nothing will appear on the screen.
+Providing an empty implementation of these two methods would be enough for adding the object to `AIS_InteractiveContext` (`::Display())`, but obviously nothing will appear on the screen.
-@section prs_builders Presentation builders
+
To go ahead, we need to define some presentation of our object.
OCCT provides a set of presentation building tools for common elements like arrows, shapes, boxes, etc.
-These tools could be found within @c Prs3d, @c StdPrs and @c DsgPrs packages:
+These tools could be found within `Prs3d`, `StdPrs` and `DsgPrs` packages:
- **Prs3d**
provides builders for simple geometric elements.
- - @c Prs3d_Arrow, @c Prs3d_BndBox, @c Prs3d_Point, @c Prs3d_Text, @c Prs3d_ToolCylinder, @c Prs3d_ToolDisk, @c Prs3d_ToolSector, @c Prs3d_ToolSphere, @c Prs3d_ToolTorus
+ - `Prs3d_Arrow`, `Prs3d_BndBox`, `Prs3d_Point`, `Prs3d_Text`, `Prs3d_ToolCylinder`, `Prs3d_ToolDisk`, `Prs3d_ToolSector`, `Prs3d_ToolSphere`, `Prs3d_ToolTorus`
- **StdPrs**
- provides builders for analytical geometry and B-Rep shapes (@c TopoDS_Shape).
- - @c StdPrs_WFShape, @c StdPrs_ShadedShape, @c StdPrs_BRepTextBuilder
+ provides builders for analytical geometry and B-Rep shapes (`TopoDS_Shape)`.
+ - `StdPrs_WFShape`, `StdPrs_ShadedShape`, `StdPrs_BRepTextBuilder`
- **DsgPrs**
provides builders for datums, dimensions and relations.
-Presentation builders are reusable bricks for constructing @c AIS objects.
-Standard OCCT interactive objects highly rely on them, so that you may easily replicate @c AIS_Shape presentation for displaying a shape with just a couple of lines calling @c StdPrs_ShadedShape:
+Presentation builders are reusable bricks for constructing `AIS` objects.
+Standard OCCT interactive objects highly rely on them, so that you may easily replicate `AIS_Shape` presentation for displaying a shape with just a couple of lines calling `StdPrs_ShadedShape:`
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -69,19 +66,19 @@ Handle(MyAisObject) aPrs = new MyAisObject();
theCtx->Display (aPrs, true);
~~~~
-@figure{ais_object_step1_shaded.png,"@c StdPrs_ShadedShape presentation builder.",409} height=409px
+
-@c PrsMgr_PresentableObject::Compute() method takes three arguments:
-- **Presentation Manager** (@c PrsMgr_PresentationManager).
+`PrsMgr_PresentableObject::Compute()` method takes three arguments:
+- **Presentation Manager** (`PrsMgr_PresentationManager)`.
Rarely used parameter, but might be necessary for some advanced use cases.
-- **Presentation** (@c Prs3d_Presentation or @c Graphic3d_Structure).
+- **Presentation** (`Prs3d_Presentation` or `Graphic3d_Structure)`.
Defines the structure to fill in with presentation elements.
- **Display Mode** (integer number).
Specifies the display mode to compute.
- **0** is a default display mode, if not overridden by @c AIS_InteractiveObject::SetDisplayMode() or by @c AIS_InteractiveContext::Display().
+ **0** is a default display mode, if not overridden by `AIS_InteractiveObject::SetDisplayMode()` or by `AIS_InteractiveContext::Display()`.
-For each supported display mode, the **Presentation Manager** creates a dedicated @c Prs3d_Presentation and stores it within the object itself as a list of presentations @c PrsMgr_PresentableObject::Presentations().
-It is a good practice to reject unsupported display modes within @c @::Compute() method:
+For each supported display mode, the **Presentation Manager** creates a dedicated `Prs3d_Presentation` and stores it within the object itself as a list of presentations `PrsMgr_PresentableObject::Presentations()`.
+It is a good practice to reject unsupported display modes within `::Compute()` method:
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -103,8 +100,8 @@ Handle(MyAisObject) aPrs = new MyAisObject();
theCtx->Display (aPrs, 100, -1, true);
~~~~
-The code above will display @c MyAisObject with display mode equal to 100, and after @c @::Compute() modifications nothing will be displayed on the screen.
-@c AIS will still create a presentation with specified display mode, but it will be empty - method @c @::AcceptDisplayMode() could be overridden to disallow even creation of an empty presentation:
+The code above will display `MyAisObject` with display mode equal to 100, and after `::Compute()` modifications nothing will be displayed on the screen.
+`AIS` will still create a presentation with specified display mode, but it will be empty - method `::AcceptDisplayMode()` could be overridden to disallow even creation of an empty presentation:
~~~~{.cpp}
bool MyAisObject::AcceptDisplayMode (const Standard_Integer theMode) const
@@ -113,8 +110,8 @@ bool MyAisObject::AcceptDisplayMode (const Standard_Integer theMode) const
}
~~~~
-@c AIS_InteractiveContext::Display() checks if requested display mode is actually supported by the object, and uses default display mode (_**0**_) if it is not.
-@c StdPrs_ShadedShape prepares a shaded (triangulated) presentation of a shape, while @c StdPrs_WFShape creates a wireframe presentation with B-Rep wire boundaries:
+`AIS_InteractiveContext::Display()` checks if requested display mode is actually supported by the object, and uses default display mode (_**0**_) if it is not.
+`StdPrs_ShadedShape` prepares a shaded (triangulated) presentation of a shape, while `StdPrs_WFShape` creates a wireframe presentation with B-Rep wire boundaries:
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -129,13 +126,13 @@ void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
}
~~~~
-@figure{ais_object_step1_shaded_wf.png,"Result of @c StdPrs_ShadedShape + @c StdPrs_WFShape presentation builders.",409} height=409px
+
-Presentation builders take the @c Prs3d_Drawer object defining various attributes - material of shaded shape, number of isolines in wireframe mode, tessellation quality, line colors and many others.
-@c PrsMgr_PresentableObject defines @c myDrawer property with default attributes.
-@c StdPrs makes it easy to display topological shapes.
-With the help of @c Prs3d tools we may display elements like arrows, boxes or text labels.
-Let's extend our presentation with a second **display mode 1** showing a bounding box using @c Prs3d_BndBox builder:
+Presentation builders take the `Prs3d_Drawer` object defining various attributes - material of shaded shape, number of isolines in wireframe mode, tessellation quality, line colors and many others.
+`PrsMgr_PresentableObject` defines `myDrawer` property with default attributes.
+`StdPrs` makes it easy to display topological shapes.
+With the help of `Prs3d` tools we may display elements like arrows, boxes or text labels.
+Let's extend our presentation with a second **display mode 1** showing a bounding box using `Prs3d_BndBox` builder:
~~~~{.cpp}
bool MyAisObject::AcceptDisplayMode (const Standard_Integer theMode) const
@@ -169,12 +166,12 @@ Handle(MyAisObject) aPrs = new MyAisObject();
theCtx->Display (aPrs, 1, 0, true);
~~~~
-@figure{ais_object_step1_bndbox.png,"@c Prs3d_BndBox presentation builder.",409} height=409px
+
-@c AIS disallows activating multiple display modes at the same time, so that these presentation modes should be alternatives to each other.
-But @c AIS may use non-active display mode for highlighting purposes - like wireframe (@c AIS_Wireframe) presentation displayed on top of shaded (@c AIS_Shaded) presentation for selected @c AIS_Shape objects.
+`AIS` disallows activating multiple display modes at the same time, so that these presentation modes should be alternatives to each other.
+But `AIS` may use non-active display mode for highlighting purposes - like wireframe (`AIS_Wireframe)` presentation displayed on top of shaded (`AIS_Shaded)` presentation for selected `AIS_Shape` objects.
-Let's define a dedicated enumeration for display modes supported by our interactive object and setup the 1st (@c MyDispMode_Highlight) display mode for highlighting with help of @c PrsMgr_PresentableObject::SetHilightMode():
+Let's define a dedicated enumeration for display modes supported by our interactive object and setup the 1st (`MyDispMode_Highlight)` display mode for highlighting with help of `PrsMgr_PresentableObject::SetHilightMode():`
~~~~{.cpp}
class MyAisObject : public AIS_InteractiveObject
@@ -199,33 +196,33 @@ theCtx->HilightWithColor (aPrs, aPrs->HilightAttributes(), false);
theCtx->CurrentViewer()->Redraw();
~~~~
-@figure{ais_object_step1_highlight.png,"Highlighting by color (left) and highlighting by another display mode (right).",818} height=409px
+
-In this particular use case we've used the method @c AIS_InteractiveContext::HilightWithColor() instead of @c @::SetSelected() - just because our object is not selectable yet and @c @::SetSelected() wouldn't work.
+In this particular use case we've used the method `AIS_InteractiveContext::HilightWithColor()` instead of `::SetSelected()` - just because our object is not selectable yet and `::SetSelected()` wouldn't work.
Highlighted presentation appears on the screen with modulated color (see left screenshot above).
Using a dedicated display mode for highlighting (right screenshot above) allows customizing presentation in selected / highlighted states.
-@section prim_arrays Primitive arrays
+
-@c Prs3d_Presentation might be filled in by the following **primitives**:
+`Prs3d_Presentation` might be filled in by the following **primitives**:
- **Triangles**
- - @c Graphic3d_ArrayOfTriangles
- - @c Graphic3d_ArrayOfTriangleFans
- - @c Graphic3d_ArrayOfTriangleStrips
+ - `Graphic3d_ArrayOfTriangles`
+ - `Graphic3d_ArrayOfTriangleFans`
+ - `Graphic3d_ArrayOfTriangleStrips`
- **Lines**
- - @c Graphic3d_ArrayOfSegments
- - @c Graphic3d_ArrayOfPolylines
+ - `Graphic3d_ArrayOfSegments`
+ - `Graphic3d_ArrayOfPolylines`
- **Points** or **Markers**
- - @c Graphic3d_ArrayOfPoints
+ - `Graphic3d_ArrayOfPoints`
This triplet of primitives is what graphics hardware is capable of rendering, so that it could be transferred directly to low-level graphics libraries in the form of *Vertex Buffer Objects* (VBO).
Each **primitive array** consists of an array of vertex attributes (_**position**, **normal**, **texture coordinates**, **vertex colors**_, etc.) and optional **array of indices**.
The latter one avoids duplicating vertices shared between connected elements (triangles, polylines) in attributes array.
-@c Graphic3d_ArrayOfPrimitives and it's subclasses provide a convenient interface for filling in primitive arrays:
+`Graphic3d_ArrayOfPrimitives` and it's subclasses provide a convenient interface for filling in primitive arrays:
- Constructor takes a number of vertices, number of edges (indices) and a bitmask of optional vertex attributes.
-- @c Graphic3d_ArrayOfPrimitives::AddVertex() appends a vertex with specified attributes to the end of the array (within the range specified at construction time).
-- @c Graphic3d_ArrayOfPrimitives::AddEdges() appends indices, starting with 1.
+- `Graphic3d_ArrayOfPrimitives::AddVertex()` appends a vertex with specified attributes to the end of the array (within the range specified at construction time).
+- `Graphic3d_ArrayOfPrimitives::AddEdges()` appends indices, starting with 1.
Each line segment is defined by two consequential edges, each triangle is defined by three consequential edges.
Let's extend our sample and display a cylinder section contour defined by array of indexed segments (e.g. a polyline of four vertices):
@@ -258,32 +255,32 @@ void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
}
~~~~
-@figure{ais_object_step2_segments.png,"Displaying @c Graphic3d_ArrayOfSegments.",409} height=409px
+
The process is quite straightforward:
-- Create a new @c Graphic3d_Group using @c Prs3d_Presentation::NewGroup();
-- Specify presentation aspects using @c Graphic3d_Group::SetGroupPrimitivesAspect();
-- Create and add an array of primitives using @c Graphic3d_Group::AddPrimitiveArray().
+- Create a new `Graphic3d_Group` using `Prs3d_Presentation::NewGroup();`
+- Specify presentation aspects using `Graphic3d_Group::SetGroupPrimitivesAspect();`
+- Create and add an array of primitives using `Graphic3d_Group::AddPrimitiveArray()`.
-Standard presentation builders like @c StdPrs_ShadedShape / @c StdPrs_WFShape internally do exactly the same thing - a tessellated representation of a shape is added to presentation in form of triangles (shaded),
+Standard presentation builders like `StdPrs_ShadedShape` / `StdPrs_WFShape` internally do exactly the same thing - a tessellated representation of a shape is added to presentation in form of triangles (shaded),
line segments (wireframe and free edges) and markers (free shape vertices).
-A single @c Graphic3d_Group normally defines just a single primitive array, but it is technically possible adding more arrays to the same group @c Graphic3d_Group::AddPrimitiveArray()
-and with different aspects @c Graphic3d_Group::SetPrimitivesAspect(), which might be considered in advanced scenarios.
+A single `Graphic3d_Group` normally defines just a single primitive array, but it is technically possible adding more arrays to the same group `Graphic3d_Group::AddPrimitiveArray()`
+and with different aspects `Graphic3d_Group::SetPrimitivesAspect()`, which might be considered in advanced scenarios.
-Method @c Graphic3d_Group::AddText() allows adding text labels to a presentation.
+Method `Graphic3d_Group::AddText()` allows adding text labels to a presentation.
Internally, text labels are rendered as an array of textured triangles using texture atlas created from a font, but this complex logic is hidden from the user.
-@section prim_aspects Primitive aspects
+
-@c Graphic3d_Aspects is a class defining **display properties** of a primitive array (@c Graphic3d_Group::SetGroupPrimitivesAspect()) -
+`Graphic3d_Aspects` is a class defining **display properties** of a primitive array (`Graphic3d_Group::SetGroupPrimitivesAspect())` -
_**material**, **shading model**, **color**, **texture maps**, **blending mode**, **line width**_ and others.
-There are also subclasses @c Graphic3d_AspectFillArea3d (triangles), @c Graphic3d_AspectLine3d (lines), @c Graphic3d_AspectMarker3d (markers)
-and @c Graphic3d_AspectText3d (text labels) defined as specializations for a specific primitive array type.
+There are also subclasses `Graphic3d_AspectFillArea3d` (triangles), `Graphic3d_AspectLine3d` (lines), `Graphic3d_AspectMarker3d` (markers)
+and `Graphic3d_AspectText3d` (text labels) defined as specializations for a specific primitive array type.
These subclasses exist for historical reasons and are treated by renderers in exactly the same way.
-It is technically possible to create transient aspects directly within @c @::Compute() method like this:
+It is technically possible to create transient aspects directly within `::Compute()` method like this:
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -300,12 +297,12 @@ void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
~~~~
While this code would work as expected, but prevents further dynamic updates of presentation aspects without recomputing entire presentation.
-Instead, it is preferred taking attributes from @c PrsMgr_PresentableObject::myDrawer / @c @::Attributes() or storing custom attributes as class fields.
-@c Prs3d_Drawer defines a set of attributes used by @c AIS presentation builders, but the same parameters might be used by a custom builder as well.
+Instead, it is preferred taking attributes from `PrsMgr_PresentableObject::myDrawer` / `::Attributes()` or storing custom attributes as class fields.
+`Prs3d_Drawer` defines a set of attributes used by `AIS` presentation builders, but the same parameters might be used by a custom builder as well.
It is also preferred preallocating attributes in the class constructor.
-This would allow changing attributes without recomputing the entire presentation - just by calling @c PrsMgr_PresentableObject::SynchronizeAspects() after modifications.
-Our custom object uses @c myDrawer->ShadingAspect() and @c myDrawer->WireAspect() aspects, so let's initialize them explicitly - assign silver material for shading and green color to line segments:
+This would allow changing attributes without recomputing the entire presentation - just by calling `PrsMgr_PresentableObject::SynchronizeAspects()` after modifications.
+Our custom object uses `myDrawer->ShadingAspect()` and `myDrawer->WireAspect()` aspects, so let's initialize them explicitly - assign silver material for shading and green color to line segments:
~~~~{.cpp}
MyAisObject::MyAisObject()
@@ -317,20 +314,20 @@ MyAisObject::MyAisObject()
}
~~~~
-@section quadric_builders Quadric builders
+
-Previously, we've used @c StdPrs_ShadedShape for displaying cylinder geometry.
-The @c Prs3d package provides a simpler way for displaying geometry like cylinders, spheres and toruses - based on the @c Prs3d_ToolQuadric interface.
-This interface allows bypassing creation of a complex B-Rep (@c TopoDS_Shape) definition of a simple geometry, and to avoid using general-purpose tessellators like @c BRepMesh.
+Previously, we've used `StdPrs_ShadedShape` for displaying cylinder geometry.
+The `Prs3d` package provides a simpler way for displaying geometry like cylinders, spheres and toruses - based on the `Prs3d_ToolQuadric` interface.
+This interface allows bypassing creation of a complex B-Rep (`TopoDS_Shape)` definition of a simple geometry, and to avoid using general-purpose tessellators like `BRepMesh`.
> This difference could be negligible for a small number of such objects, but might become considerable for larger amounts.
-> The B-Rep definition of a valid cylinder includes 2 unique @c TopoDS_Vertex, 3 @c TopoDS_Edge, 3 @c TopoDS_Wire, 3 @c TopoDS_Face, 1 @c TopoDS_Shell and 1 @c TopoDS_Solid.
-> Internally each @c TopoDS_Edge also defines curves (@c Geom_Curve as well as 2D parametric @c Geom2d_Curve) and each @c TopoDS_Face defines analytical surface (@c Geom_Surface).
-> Meshing such geometry with the help of @c BRepMesh is much more complicated than one may think.
+> The B-Rep definition of a valid cylinder includes 2 unique `TopoDS_Vertex`, 3 `TopoDS_Edge`, 3 `TopoDS_Wire`, 3 `TopoDS_Face`, 1 `TopoDS_Shell` and 1 `TopoDS_Solid`.
+> Internally each `TopoDS_Edge` also defines curves (`Geom_Curve` as well as 2D parametric `Geom2d_Curve)` and each `TopoDS_Face` defines analytical surface (`Geom_Surface)`.
+> Meshing such geometry with the help of `BRepMesh` is much more complicated than one may think.
> A plenty of data structures (memory!) and computations (time!) for displaying a geometry that could be triangulated by a simple for loop.
-@c Prs3d_ToolQuadric solves this problem by creating a triangulation for such kinds of shapes in a straight-forward way.
-Let's try using @c Prs3d_ToolCylinder in our sample:
+`Prs3d_ToolQuadric` solves this problem by creating a triangulation for such kinds of shapes in a straight-forward way.
+Let's try using `Prs3d_ToolCylinder` in our sample:
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -354,7 +351,7 @@ void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
}
~~~~
-@figure{ais_object_step3_quadrics_10.png,"@c Prs3d_ToolCylinder (10 slices).",409} height=409px
+
Well... that looks a little bit edgy.
Quadric builder creates a triangulation taking the following parameters:
@@ -362,21 +359,22 @@ Quadric builder creates a triangulation taking the following parameters:
(in case of a cylinder - base radius, top radius and height).
- Number of subdivisions along U (slices) and V (stacks) parameters.
In some cases only one parametric scope matters.
-- Transformation @c gp_Trsf to apply
+- Transformation `gp_Trsf` to apply
(original geometry is defined within some reference coordinate system).
Let's increase number of subdivisions from _10_ to _25_:
+
~~~~{.cpp}
Handle(Graphic3d_ArrayOfTriangles) aTris =
Prs3d_ToolCylinder::Create (aRadius, aRadius, aHeight, 25, 25, gp_Trsf());
~~~~
-@figure{ais_object_step3_quadrics_25.png,"@c Prs3d_ToolCylinder (25 slices).",409} height=409px
+
-It looks much better now! Note that @c Prs3d_ToolCylinder could be used for building both cones and cylinders depending on top/bottom radius definition.
+It looks much better now! Note that `Prs3d_ToolCylinder` could be used for building both cones and cylinders depending on top/bottom radius definition.
There is one issue though - our cylinder doesn't have top and bottom anymore!
-To fix this problem we will use one more quadric builder @c Prs3d_ToolDisk:
+To fix this problem we will use one more quadric builder `Prs3d_ToolDisk:`
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -414,9 +412,9 @@ Now our cylinder looks solid! The sample above merges two triangulations into a
This looks like a minor difference, but it might have a _dramatic impact on performance_ in case of a large scene,
as each `Graphic3d_ArrayOfPrimitives` is mapped into a dedicated draw call at graphic driver (OpenGL) level.
-@figure{ais_object_step3_quadrics_fin.png,"@c Prs3d_ToolCylinder + @c Prs3d_ToolDisk.",409} height=409px
+
-As an exercise, let's try computing a triangulation for cylinder disk without help of @c Prs3d_ToolDisk builder:
+As an exercise, let's try computing a triangulation for cylinder disk without help of `Prs3d_ToolDisk` builder:
~~~~{.cpp}
void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -456,24 +454,25 @@ void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
}
~~~~
-@figure{ais_object_step3_quadrics_disk.png,"Manually triangulated disk.",409} height=409px
+
The disk is here, but it has a strange color - like it is not affected by lighting.
This happens when vertex normals are defined incorrectly.
-In our case we defined disk normal as @c -DZ (see the second argument of @c Graphic3d_ArrayOfTriangles::AddVertex()),
+In our case we defined disk normal as `-DZ` (see the second argument of `Graphic3d_ArrayOfTriangles::AddVertex())`,
but normal direction should be also aligned to triangulation winding rule.
-Graphic driver defines the front side of triangle using clockwise order of triangle nodes, and normal should be defined for a front side of triangle - e.g. it should be @c gp::DZ() in our case.
-After reversing vertex normal direction, cylinder looks exactly like when @c Prs3d_ToolDisk was used.
+Graphic driver defines the front side of triangle using clockwise order of triangle nodes, and normal should be defined for a front side of triangle - e.g. it should be `gp::DZ()` in our case.
+After reversing vertex normal direction, cylinder looks exactly like when `Prs3d_ToolDisk` was used.
+
+Front / back face orientation might be displayed using different material based on `Graphic3d_Aspects::SetDistinguish()` flag and `::FrontMaterial()` / `::BackMaterial()` setup.
-Front / back face orientation might be displayed using different material based on @c Graphic3d_Aspects::SetDistinguish() flag and @c @::FrontMaterial() / @c @::BackMaterial() setup.
+
-@section ais_selection Computing selection
-In the first part of the tutorial we have created a custom @c AIS object @c MyAisObject computing presentation by implementing the @c PrsMgr_PresentableObject::Compute() interface.
-In this part we will extend our object with interactive capabilities and make it selectable through implementing @c SelectMgr_SelectableObject interface.
+In the first part of the tutorial we have created a custom `AIS` object `MyAisObject` computing presentation by implementing the `PrsMgr_PresentableObject::Compute()` interface.
+In this part we will extend our object with interactive capabilities and make it selectable through implementing `SelectMgr_SelectableObject` interface.
-Let's do the first step and put into @c @::ComputeSelection() method some logic.
-This method should fill in the @c SelectMgr_Selection argument with @c SelectMgr_SensitiveEntity entities defining selectable elements - triangulations, polylines, points and their composition.
-@c Select3D_SensitiveBox is probably the simplest way to define selectable volume - by it's bounding box:
+Let's do the first step and put into `::ComputeSelection()` method some logic.
+This method should fill in the `SelectMgr_Selection` argument with `SelectMgr_SensitiveEntity` entities defining selectable elements - triangulations, polylines, points and their composition.
+`Select3D_SensitiveBox` is probably the simplest way to define selectable volume - by it's bounding box:
~~~~{.cpp}
void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
@@ -489,20 +488,20 @@ void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
}
~~~~
-@c SelectMgr_EntityOwner is a key object in selection logic - it serves as an identifier of a pickable object or it's part.
-You may see this object in methods like @c AIS_InteractiveContext::DetectedOwner(), **Owners** are stored within the list of selection objects @c AIS_Selection
-and it received by methods like @c AIS_InteractiveContext::SetSelected() and @c AIS_InteractiveContext::AddOrRemoveSelected().
-From the Selector's point of view, @c AIS_InteractiveObject is just a drawer for @c SelectMgr_EntityOwner.
+`SelectMgr_EntityOwner` is a key object in selection logic - it serves as an identifier of a pickable object or it's part.
+You may see this object in methods like `AIS_InteractiveContext::DetectedOwner()`, **Owners** are stored within the list of selection objects `AIS_Selection`
+and it received by methods like `AIS_InteractiveContext::SetSelected()` and `AIS_InteractiveContext::AddOrRemoveSelected()`.
+From the Selector's point of view, `AIS_InteractiveObject` is just a drawer for `SelectMgr_EntityOwner`.
The _**0th selection mode**_ normally defines a single Owner of the entire object.
To make a composite object selectable as whole, we add to Selection as many SensitiveEntity as necessary referring to the same Owner.
-It might look confusing from first glance, that @c SelectMgr_SensitiveEntity stores @c SelectMgr_EntityOwner as a class field, and not in the opposite way
-(@c SelectMgr_EntityOwner doesn't store the list of @c SelectMgr_SensitiveEntity defining it's picking volume).
+It might look confusing from first glance, that `SelectMgr_SensitiveEntity` stores `SelectMgr_EntityOwner` as a class field, and not in the opposite way
+(`SelectMgr_EntityOwner` doesn't store the list of `SelectMgr_SensitiveEntity` defining it's picking volume).
For local selection (selection of object parts) we create individual Owners for each part and add SensitiveEntity to Selection in the same way.
-Owner may store an additional identifier as a class field, like @c StdSelect_BRepOwner stores @c TopoDS_Shape as an identifier of picked sub-shape with @c AIS_Shape object.
+Owner may store an additional identifier as a class field, like `StdSelect_BRepOwner` stores `TopoDS_Shape` as an identifier of picked sub-shape with `AIS_Shape` object.
-In a similar way as @c StdPrs_ShadedShape is a **presentation builder** for @c TopoDS_Shape, the @c StdSelect_BRepSelectionTool can be seen as a standard **selection builder** for shapes:
+In a similar way as `StdPrs_ShadedShape` is a **presentation builder** for `TopoDS_Shape`, the `StdSelect_BRepSelectionTool` can be seen as a standard **selection builder** for shapes:
~~~~{.cpp}
void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
@@ -517,9 +516,9 @@ void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
}
~~~~
-Internally, @c StdSelect_BRepSelectionTool iterates over sub-shapes and appends to the Selection (@c theSel) entities like @c Select3D_SensitiveTriangulation (for faces) and @c Select3D_SensitiveCurve (for edges).
+Internally, `StdSelect_BRepSelectionTool` iterates over sub-shapes and appends to the Selection (`theSel)` entities like `Select3D_SensitiveTriangulation` (for faces) and `Select3D_SensitiveCurve` (for edges).
-Previously, we have used @c Prs3d_ToolCylinder to triangulate a cylinder, so let's try to construct @c Select3D_SensitivePrimitiveArray from the same triangulation:
+Previously, we have used `Prs3d_ToolCylinder` to triangulate a cylinder, so let's try to construct `Select3D_SensitivePrimitiveArray` from the same triangulation:
~~~~{.cpp}
void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
@@ -541,7 +540,7 @@ Selection is computed independently from presentation, so that they don't have t
But inconsistency between presentation and selection might confuse a user, when he will not be able to pick an object clearly displayed under the mouse cursor.
These issues might happen, for example, when selection uses tessellated representation of the same geometry computed with different parameters (different number of subdivisions, or different deflection parameters).
-As in case of @c @::Compute(), it makes sense defining some enumeration of **selection modes** supported by specific object and reject unsupported ones to avoid unexpected behavior:
+As in case of `::Compute()`, it makes sense defining some enumeration of **selection modes** supported by specific object and reject unsupported ones to avoid unexpected behavior:
~~~~{.cpp}
void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
@@ -552,7 +551,7 @@ void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
}
~~~~
-Unlike display modes, @c AIS_InteractiveContext allows activating an arbitrary combination of selection modes.
+Unlike display modes, `AIS_InteractiveContext` allows activating an arbitrary combination of selection modes.
A user should be careful to activate only the modes that actually make sense and may work together.
Selection mode to activate could be specified while displaying the object (passing _**-1**_ instead of _**0**_ would display an object with deactivated selection):
@@ -563,12 +562,12 @@ Handle(MyAisObject) aPrs = new MyAisObject();
theCtx->Display (aPrs, MyAisObject::MyDispMode_Main, 0, false);
~~~~
-Later on @c AIS_InteractiveContext::SetSelectionModeActive(), or it's wrappers @c AIS_InteractiveContext::Activate() and @c AIS_InteractiveContext::Deactivate(),
+Later on `AIS_InteractiveContext::SetSelectionModeActive()`, or it's wrappers `AIS_InteractiveContext::Activate()` and `AIS_InteractiveContext::Deactivate()`,
could be used to enable or disable desired selection modes one by one.
-@section sel_owner_highlight Highlighting selection owner
+
-As has been mentioned in the previous section, @c SelectMgr_EntityOwner is a key object which can be used as an identifier of selectable part(s).
+As has been mentioned in the previous section, `SelectMgr_EntityOwner` is a key object which can be used as an identifier of selectable part(s).
Naturally, you might want to subclass it to put some application-specific ids for identification of selected parts.
But there are more things you may do with the Owner class like customized highlighting.
@@ -595,8 +594,8 @@ protected:
};
~~~~
-@c SelectMgr_EntityOwner doesn't define any pure virtual methods, and can be instanced straight ahead, like it was done within @c MyAisObject::ComputeSelection() implementation above.
-Let's revert usage of a dedicated display mode for highlighting (remove @c SetHilightMode() in @c MyAisObject constructor) and use our new class @c MyAisOwner within @c @::ComputeSelection():
+`SelectMgr_EntityOwner` doesn't define any pure virtual methods, and can be instanced straight ahead, like it was done within `MyAisObject::ComputeSelection()` implementation above.
+Let's revert usage of a dedicated display mode for highlighting (remove `SetHilightMode()` in `MyAisObject` constructor) and use our new class `MyAisOwner` within `::ComputeSelection():`
~~~~{.cpp}
MyAisObject::MyAisObject()
@@ -616,8 +615,8 @@ void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
~~~~
The further logic creating sensitive entities and filling in Selection could be left as is.
-Substitution of @c SelectMgr_EntityOwner with @c MyAisOwner currently doesn't change behavior and we see highlighting of the entire object through color modulation.
-This is because default implementation of @c SelectMgr_EntityOwner for highlighting logic looks like this (simplified):
+Substitution of `SelectMgr_EntityOwner` with `MyAisOwner` currently doesn't change behavior and we see highlighting of the entire object through color modulation.
+This is because default implementation of `SelectMgr_EntityOwner` for highlighting logic looks like this (simplified):
~~~~{.cpp}
void SelectMgr_EntityOwner::HilightWithColor (
@@ -633,9 +632,9 @@ void SelectMgr_EntityOwner::HilightWithColor (
}
~~~~
-@figure{ais_object_step4_highlight1.png,"Default behavior of @c SelectMgr_EntityOwner::HilightWithColor().",409} height=409px
+
-Now, let's override the @c SelectMgr_EntityOwner::HilightWithColor() method and display a bounding box presentation:
+Now, let's override the `SelectMgr_EntityOwner::HilightWithColor()` method and display a bounding box presentation:
~~~~{.cpp}
void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -655,14 +654,14 @@ void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& the
}
~~~~
-@c SelectMgr_EntityOwner::HilightWithColor() doesn't receive a presentation to fill in as an argument; highlight presentation should be manually created and even explicitly displayed on the screen.
-To avoid code duplication, the code above reuses @c MyAisObject::Compute() already implementing computation of highlight presentation.
+`SelectMgr_EntityOwner::HilightWithColor()` doesn't receive a presentation to fill in as an argument; highlight presentation should be manually created and even explicitly displayed on the screen.
+To avoid code duplication, the code above reuses `MyAisObject::Compute()` already implementing computation of highlight presentation.
-@figure{ais_object_step4_highlight2.png,"Result of custom implementation @c MyAisOwner::HilightWithColor().",409} height=409px
+
The visual result of the selected object looks exactly the same as when we've used a dedicated highlight mode.
One thing became broken, though - highlighting remains displayed even after clearing selection.
-To fix this issue, we need implementing @c SelectMgr_EntityOwner::Unhilight() and hide our custom presentation explicitly:
+To fix this issue, we need implementing `SelectMgr_EntityOwner::Unhilight()` and hide our custom presentation explicitly:
~~~~{.cpp}
void MyAisOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
@@ -673,8 +672,8 @@ void MyAisOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
~~~~
Another problem is that the object is no longer dynamically highlighted.
-To fix that we need to handle @c PrsMgr_PresentationManager::IsImmediateModeOn() specifically.
-Within this mode turned ON, presentation should be displayed on the screen with help of @c PrsMgr_PresentationManager::AddToImmediateList() method
+To fix that we need to handle `PrsMgr_PresentationManager::IsImmediateModeOn()` specifically.
+Within this mode turned ON, presentation should be displayed on the screen with help of `PrsMgr_PresentationManager::AddToImmediateList()` method
(it will be cleared from the screen automatically on the next mouse movement):
~~~~{.cpp}
@@ -703,7 +702,7 @@ void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& the
}
~~~~
-We may create two dedicated presentations for dynamic highlighting or reuse existing one for both cases with help of a transient object @c Prs3d_PresentationShadow.
+We may create two dedicated presentations for dynamic highlighting or reuse existing one for both cases with help of a transient object `Prs3d_PresentationShadow`.
Let's go further and make dynamic highlighting a little bit more interesting - by drawing a surface normal at the point where mouse picked the object:
@@ -744,22 +743,22 @@ void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& the
}
~~~~
-Code above does not store our new highlight presentation as a property of @c MyAisOwner, and instead uses @c SelectMgr_SelectableObject::GetHilightPresentation() method
+Code above does not store our new highlight presentation as a property of `MyAisOwner`, and instead uses `SelectMgr_SelectableObject::GetHilightPresentation()` method
to create a presentation stored directly inside of our interactive object.
-Next trick is passing through the last picking results in @c StdSelect_ViewerSelector.
+Next trick is passing through the last picking results in `StdSelect_ViewerSelector`.
Dynamic highlighting is expected to be called right after picking, so that highlighted Owner should be always found in picking results.
-@c StdSelect_ViewerSelector::Picked() returns entities in the descending order of their distance from picking ray origin (mouse cursor);
-normally our Owner should be the very first one in this list when no selection filters are assigned to @c AIS_InteractiveContext.
+`StdSelect_ViewerSelector::Picked()` returns entities in the descending order of their distance from picking ray origin (mouse cursor);
+normally our Owner should be the very first one in this list when no selection filters are assigned to `AIS_InteractiveContext`.
-@c SelectMgr_SortCriterion provides us useful information like 3D point on detected object lying on the picking ray, and surface normal direction at this point (actually, it would be a normal to a picked triangle),
-which we display as an arrow with help of @c Prs3d_Arrow presentation builder.
+`SelectMgr_SortCriterion` provides us useful information like 3D point on detected object lying on the picking ray, and surface normal direction at this point (actually, it would be a normal to a picked triangle),
+which we display as an arrow with help of `Prs3d_Arrow` presentation builder.
-@figure{ais_object_step4_highlight3.png,"Surface normal on mouse over.",409} height=409px
+
Result looks pretty nice on the screenshot, but has interaction problems - once displayed, an arrow is no longer updated with further mouse movements.
-But this behavior is not a bug - @c AIS calls @c MyAisOwner::HilightWithColor() only when picking Owner changes to avoid unnecessary Viewer updates.
-To override this behavior, we may override @c SelectMgr_EntityOwner::IsForcedHilight() option:
+But this behavior is not a bug - `AIS` calls `MyAisOwner::HilightWithColor()` only when picking Owner changes to avoid unnecessary Viewer updates.
+To override this behavior, we may override `SelectMgr_EntityOwner::IsForcedHilight()` option:
~~~~{.cpp}
class MyAisOwner : public SelectMgr_EntityOwner
@@ -773,52 +772,52 @@ This solves the problem within our specific use case.
Keep in mind that most objects don't need updating highlight presentation on every mouse move;
overriding this flag everywhere would be a waste of resources and may cause performance issues - use it sparingly.
-@section highlight_apporaches Highlighting approaches
+
-@c AIS provides one more alternative to handle presentation highlighting, which is managed by option @c SelectMgr_SelectableObject::IsAutoHilight().
-By default, this option is turned ON and redirects highlighting logic to @c SelectMgr_EntityOwner::HilightWithColor() demonstrated in the previous section.
-Turning this option OFF redirects highlighting logic to the interactive object itself @c SelectMgr_SelectableObject::HilightSelected().
+`AIS` provides one more alternative to handle presentation highlighting, which is managed by option `SelectMgr_SelectableObject::IsAutoHilight()`.
+By default, this option is turned ON and redirects highlighting logic to `SelectMgr_EntityOwner::HilightWithColor()` demonstrated in the previous section.
+Turning this option OFF redirects highlighting logic to the interactive object itself `SelectMgr_SelectableObject::HilightSelected()`.
Apart from moving the logic from Owner to Interactive Object, this approach allows handling highlighting of all selected Owners within the same Object at once and sharing a common presentation
-instead of per-Owner presentation - improving performance and reducing memory utilization in case of a large number of small selectable elements, like mesh nodes in @c MeshVS_Mesh object.
+instead of per-Owner presentation - improving performance and reducing memory utilization in case of a large number of small selectable elements, like mesh nodes in `MeshVS_Mesh` object.
The further optimization of such a scenario would be using a single Owner for the entire Object
-storing the list of selected elements within the Owner itself - as utilized by @c AIS_PointCloud object for highlighting individual points.
+storing the list of selected elements within the Owner itself - as utilized by `AIS_PointCloud` object for highlighting individual points.
-We wouldn't describe these advanced techniques here in detail - let's just summarize main highlighting approaches available in @c AIS:
+We wouldn't describe these advanced techniques here in detail - let's just summarize main highlighting approaches available in `AIS:`
- Highlighting of a main presentation of Interactive Object (active display mode)
- filled in by @c PrsMgr_PresentableObject::Compute()
- and displayed with color modulation by @c AIS logic.
- - Example: @c AIS_TextLabel.
+ filled in by `PrsMgr_PresentableObject::Compute()`
+ and displayed with color modulation by `AIS` logic.
+ - Example: `AIS_TextLabel`.
- Highlighting of a secondary presentation of Interactive Object
- filled in by @c PrsMgr_PresentableObject::Compute()
- and displayed with color modulation by @c AIS logic.
- - Example: @c AIS_Shape, displayed in @c AIS_Shaded display mode and highlighted using @c AIS_Wireframe display mode (default behavior).
- See also @c PrsMgr_PresentableObject::SetHilightMode().
-- Highlight presentation stored within a custom @c SelectMgr_EntityOwner
- and managed by @c SelectMgr_EntityOwner::HilightWithColor().
- - Example: @c StdSelect_BRepOwner for selection of sub-shapes.
+ filled in by `PrsMgr_PresentableObject::Compute()`
+ and displayed with color modulation by `AIS` logic.
+ - Example: `AIS_Shape`, displayed in `AIS_Shaded` display mode and highlighted using `AIS_Wireframe` display mode (default behavior).
+ See also `PrsMgr_PresentableObject::SetHilightMode()`.
+- Highlight presentation stored within a custom `SelectMgr_EntityOwner`
+ and managed by `SelectMgr_EntityOwner::HilightWithColor()`.
+ - Example: `StdSelect_BRepOwner` for selection of sub-shapes.
- Custom highlight presentation stored within Interactive Object itself
- (see @c SelectMgr_SelectableObject::GetHilightPresentation() / @c @::GetSelectPresentation() methods).
- - Filled in by @c SelectMgr_EntityOwner::HilightWithColor()
- with @c SelectMgr_SelectableObject::IsAutoHilight() turned ON.
- Example: @c AIS_PointCloud.
- - Filled in by @c SelectMgr_SelectableObject::HilightSelected()
- with @c SelectMgr_SelectableObject::IsAutoHilight() turned OFF.
- Example: @c MeshVS_Mesh.
+ (see `SelectMgr_SelectableObject::GetHilightPresentation()` / `::GetSelectPresentation()` methods).
+ - Filled in by `SelectMgr_EntityOwner::HilightWithColor()`
+ with `SelectMgr_SelectableObject::IsAutoHilight()` turned ON.
+ Example: `AIS_PointCloud`.
+ - Filled in by `SelectMgr_SelectableObject::HilightSelected()`
+ with `SelectMgr_SelectableObject::IsAutoHilight()` turned OFF.
+ Example: `MeshVS_Mesh`.
- Main presentation of Interactive Object (active display mode)
- filled in by @c PrsMgr_PresentableObject::Compute()
+ filled in by `PrsMgr_PresentableObject::Compute()`
and manually updated (recomputed or modified aspects) on highlight events.
- - Example: @c AIS_Manipulator.
+ - Example: `AIS_Manipulator`.
The number of options looks overwhelming but in general, it is better to stick to the simplest approach working for you and consider alternatives only when you have to.
-@section mouse_click Mouse click
+
-Dynamic highlighting is only one of scenarios where @c SelectMgr_EntityOwner could be useful.
-Another feature is an interface for handling a mouse click @c SelectMgr_EntityOwner @c @::HandleMouseClick().
+Dynamic highlighting is only one of scenarios where `SelectMgr_EntityOwner` could be useful.
+Another feature is an interface for handling a mouse click `SelectMgr_EntityOwner` `::HandleMouseClick()`.
-This interface is useful for defining some user interface elements like buttons, and most likely your application will use a more comprehensive GUI framework for this purpose instead of @c AIS.
+This interface is useful for defining some user interface elements like buttons, and most likely your application will use a more comprehensive GUI framework for this purpose instead of `AIS`.
But let's have some fun and make our object to change a color on each mouse click:
~~~~{.cpp}
@@ -848,7 +847,7 @@ bool MyAisOwner::HandleMouseClick (const Graphic3d_Vec2i& thePoint,
~~~~
Looks pretty simple. Now let's make things more interesting and launch some simple object animation on each click.
-We use a couple of global (@c static) variables in our sample for simplicity - don't do that in a real production code.
+We use a couple of global (`static)` variables in our sample for simplicity - don't do that in a real production code.
~~~~{.cpp}
class MyAisOwner : public SelectMgr_EntityOwner
@@ -885,8 +884,8 @@ bool MyAisOwner::HandleMouseClick (const Graphic3d_Vec2i& thePoint,
~~~~
Animation is a complex topic that is worth a dedicated article - let's not go too deep in detail here.
-To perform animation in a non-interrupted way, it should be handled by some class like @c AIS_ViewController, which is responsible for managing user input events and for 3D viewer updates.
-To utilize it, you need adding a custom object animation to @c AIS_ViewController::ObjectsAnimation() or adding custom view animation to @c AIS_ViewController::ViewAnimation().
+To perform animation in a non-interrupted way, it should be handled by some class like `AIS_ViewController`, which is responsible for managing user input events and for 3D viewer updates.
+To utilize it, you need adding a custom object animation to `AIS_ViewController::ObjectsAnimation()` or adding custom view animation to `AIS_ViewController::ViewAnimation()`.
Somewhere in application this might look like this:
~~~~{.cpp}
@@ -897,9 +896,9 @@ aPrs->SetAnimation (theViewCtrl->ObjectsAnimation());
theCtx->Display (aPrs, MyAisObject::MyDispMode_Main, 0, false);
~~~~
-@section final Final result
+
-The final sample could be seen by calling @c QATutorialAisObject command from Draw Harness plugin @c QAcommands (@c TKQADraw toolkit):
+The final sample could be seen by calling `QATutorialAisObject` command from Draw Harness plugin `QAcommands` (`TKQADraw` toolkit):
~~~~
pload VISUALIZATION QAcommands
@@ -908,4 +907,4 @@ QATutorialAisObject p
vfit
~~~~
-You may also take a look onto source code of this command at @c src/QADraw/QADraw_Tutorials.cxx if you have some problems following the tutorial.
+You may also take a look onto source code of this command at `src/QADraw/QADraw_Tutorials`.cxx if you have some problems following the tutorial.
diff --git a/dox/specification/boolean_operations/boolean_operations.md b/dox/boolean_operations.md
similarity index 77%
rename from dox/specification/boolean_operations/boolean_operations.md
rename to dox/boolean_operations.md
index f57c183e92..08e9951f34 100644
--- a/dox/specification/boolean_operations/boolean_operations.md
+++ b/dox/boolean_operations.md
@@ -1,9 +1,6 @@
-Boolean Operations {#specification__boolean_operations}
-=========================
+# Boolean Operations
-@tableofcontents
-
-@section specification__boolean_1 Introduction
+
Boolean operations are used to create new shapes from the combinations of two groups of shapes.
This document provides a comprehensive description of the algorithms in the Boolean Operations Component as it is implemented in Open CASCADE Technology. The Boolean Component contains:
@@ -18,11 +15,11 @@ GFA is the base algorithm for BOA, SPA, SA.
GFA has a history-based architecture designed to allow using OCAF naming functionality. The architecture of GFA is expandable, that allows creating new algorithms basing on it.
-@section specification__boolean_2 Overview
+
-@subsection specification__boolean_2_1 Operators
+
-@subsubsection specification__boolean_2_1_1 Boolean operator
+
The Boolean operator provides the following operations between two groups *Objects* and *Tools*:
* FUSE - Union of two groups;
@@ -46,9 +43,9 @@ where:
**Note** There is an operation *Cut21*, which is an extension for forward Cut operation, i.e Cut21=Cut(G2, G1).
-For more details see @ref specification__boolean_9 "Boolean Operations Algorithm" section.
+For more details see [Boolean Operations Algorithm](#specification__boolean_9) section.
-@subsubsection specification__boolean_2_1_2 General Fuse operator
+
The General fuse operator can be applied to an arbitrary number of arguments in terms of *TopoDS_Shape*.
@@ -67,7 +64,7 @@ For example, for two arguments *S1* and *S2* the result *R
RGF = GF (S1, S2) = Sp1 + Sp2 + Sp12
-@figure{/specification/boolean_operations/images/operations_image001.svg,"Operators",320}
+
This Figure shows that
* Bcommon (S1, S2) = Sp12;
@@ -79,9 +76,9 @@ This Figure shows that
The fact that *RGF* contains the components of *RB* allows considering GFA as the general case of BOA. So it is possible to implement BOA as a subclass of GFA.
-For more details see @ref specification__boolean_7 "General Fuse Algorithm" section.
+For more details see [General Fuse Algorithm](#specification__boolean_7) section.
-@subsubsection specification__boolean_2_1_3 Splitter operator
+
The Splitter operator can be applied to an arbitrary number of arguments in terms of *TopoDS_Shape*. The arguments are divided into two groups: *Objects* and *Tools*. The result of *SPA* contains all parts that belong to the *Objects* but does not contain the parts that belong to the *Tools*.
@@ -109,9 +106,9 @@ For example, when *G1* consists of shapes *S1* and *S
The fact that the *RGF* contains the components of *RSPA* allows considering *GFA* as the general case of *SPA*. Thus, it is possible to implement *SPA* as a subclass of *GFA*.
-For more details see @ref specification__boolean_8 "Splitter Algorithm" section.
+For more details see [Splitter Algorithm](#specification__boolean_8) section.
-@subsubsection specification__boolean_2_1_4 Section operator
+
The Section operator *SA* can be applied to arbitrary number of arguments in terms of *TopoDS_Shape*. The result of *SA* contains vertices and edges in accordance with interferences between the arguments
The SA operator can be represented as follows:
@@ -120,9 +117,9 @@ The SA operator can be represented as follows:
* S1, S2 ... Sn -- the operation arguments;
* *n* -- the number of arguments.
-For more details see @ref specification__boolean_10a "Section Algorithm" section.
+For more details see [Section Algorithm](#specification__boolean_10a) section.
-@subsection specification__boolean_2_2 Parts of algorithms
+
GFA, BOA, SPA and SA have the same Data Structure (DS). The main goal of the Data Structure is to store all necessary information for input data and intermediate results.
@@ -132,11 +129,11 @@ The operators consist of two main parts:
As it follows from the definition of operator results, the main differences between GFA, BOA, SPA and SA are in the Building Part. The Intersection Part is the same for the algorithms.
-@section specification__boolean_3 Terms and Definitions
+
This chapter provides the background terms and definitions that are necessary to understand how the algorithms work.
-@subsection specification__boolean_3_1 Interferences
+
There are two groups of interferences.
@@ -154,37 +151,37 @@ At second, there are interferences that occur between a solid *Z1* and a shape *
* Face/Solid and
* Solid/Solid.
-@subsubsection specification__boolean_3_1_1 Vertex/Vertex interference
+
For two vertices *Vi* and *Vj*, the distance between their corresponding 3D points is less than the sum of their tolerances *Tol(Vi)* and *Tol(Vj)*.
-@figure{/specification/boolean_operations/images/operations_image002.svg,"Vertex/vertex interference",420}
+
The result is a new vertex *Vn* with 3D point *Pn* and tolerance value Tol(Vn).
The coordinates of *Pn* and the value Tol(Vn) are computed as the center and the radius of the sphere enclosing the tolerance spheres of the source vertices (V1, V2).
-@subsubsection specification__boolean_3_1_2 Vertex/Edge interference
+
For a vertex *Vi* and an edge *Ej*, the distance *D* between 3D point of the vertex and its projection on the 3D curve of edge *Ej* is less or equal than sum of tolerances of vertex *Tol(Vi)* and edge *Tol(Ej)*.
-@figure{/specification/boolean_operations/images/operations_image003.svg,"Vertex/edge interference",420}
+
The result is vertex *Vi* with the corresponding tolerance value Tol(Vi)=Max(Tol(Vi), D+Tol(Ej)), where D = distance (Pi, PPi);
and parameter *ti* of the projected point *PPi* on 3D curve *Cj* of edge *Ej*.
-@subsubsection specification__boolean_3_1_3 Vertex/Face interference
+
For a vertex *Vi* and a face *Fj* the distance *D* between 3D point of the vertex and its projection on the surface of the face is less or equal than sum of tolerances of the vertex *Tol(Vi)* and the face *Tol(Fj)*.
-@figure{/specification/boolean_operations/images/operations_image004.svg,"Vertex/face interference",420}
+
The result is vertex *Vi* with the corresponding tolerance value Tol(Vi)=Max(Tol(Vi), D+Tol(Fj)), where D = distance (Pi, PPi)
and parameters ui, vi of the projected point *PPi* on surface *Sj* of face *Fj*.
-@subsubsection specification__boolean_3_1_4 Edge/Edge interference
+
For two edges *Ei* and *Ej* (with the corresponding 3D curves *Ci* and *Cj*) there are some places where the distance between the curves is less than (or equal to) sum of tolerances of the edges.
@@ -192,7 +189,7 @@ Let us examine two cases:
In the first case two edges have one or several common parts of 3D curves in terms of tolerance.
-@figure{/specification/boolean_operations/images/operations_image005.svg,"Edge/edge interference: common parts",420}
+
The results are:
* Parametric range [ti1, ti2 ] for 3D curve *Ci* of edge *Ei*.
@@ -200,7 +197,7 @@ The results are:
In the second case two edges have one or several common points in terms of tolerance.
-@figure{/specification/boolean_operations/images/operations_image006.svg,"Edge/edge interference: common points",420}
+
The result is a new vertex *Vn* with 3D point *Pn* and tolerance value *Tol(Vn)*.
@@ -209,7 +206,7 @@ The coordinates of *Pn* and the value *Tol(Vn)* are computed as the center and t
* Parameter *ti* of *Pi* for the 3D curve *Ci*.
* Parameter *tj* of *Pj* for the 3D curve *Cj*.
-@subsubsection specification__boolean_3_1_5 Edge/Face interference
+
For an edge *Ei* (with the corresponding 3D curve *Ci*) and a face *Fj* (with the corresponding 3D surface *Sj*) there are some places in 3D space, where the distance between *Ci* and surface *Sj* is less than (or equal to) the sum of tolerances of edge *Ei* and face *Fj*.
@@ -217,13 +214,13 @@ Let us examine two cases:
In the first case Edge *Ei* and Face *Fj* have one or several common parts in terms of tolerance.
-@figure{/specification/boolean_operations/images/operations_image007.svg,"Edge/face interference: common parts",420}
+
The result is a parametric range [ti1, ti2] for the 3D curve *Ci* of the edge *Ei*.
In the second case Edge *Ei* and Face *Fj* have one or several common points in terms of tolerance.
-@figure{/specification/boolean_operations/images/operations_image008.svg,"Edge/face interference: common points",420}
+
The result is a new vertex *Vn* with 3D point *Pn* and tolerance value *Tol(Vn)*.
@@ -232,15 +229,15 @@ The coordinates of *Pn* and the value *Tol(Vn)* are computed as the center and t
* Parameter *ti* of *Pi* for the 3D curve *Ci*.
* Parameters *ui* and *vi* of the projected point *PPi* on the surface *Sj* of the face *Fj*.
-@subsubsection specification__boolean_3_1_6 Face/Face Interference
+
For a face *Fi* and a face *Fj* (with the corresponding surfaces *Si* and *Sj*) there are some places in 3D space, where the distance between the surfaces is less than (or equal to) sum of tolerances of the faces.
-@figure{/specification/boolean_operations/images/operations_image009.svg,"Face/face interference: common curves",418}
+
In the first case the result contains intersection curves *Cijk (k = 0, 1, 2…kN,* where *kN* is the number of intersection curves with corresponding values of tolerances *Tol(Cijk)*.
-@figure{/specification/boolean_operations/images/operations_image010.svg,"Face/face interference: common points",305}
+
In the second case Face *Fi* and face *Fj* have one or several new vertices *Vijm*, where m=0,1,2, ... mN, mN is the number of intersection points.
@@ -249,32 +246,32 @@ The coordinates of a 3D point *Pijm* and the value *Tol(Vijmj*, *vj* belong to point *PPj* projected on surface *Sj* of face *Fj*.
* Parameters *ui* and *vi* belong to point *PPi* projected on surface *Si* of face *Fi*.
-@subsubsection specification__boolean_3_1_7 Vertex/Solid Interference
+
For a vertex *Vi* and a solid *Zj* there is Vertex/Solid interference if the vertex *Vi* has no BRep interferences with any sub-shape of *Zj* and *Vi* is completely inside the solid *Zj*.
-@figure{/specification/boolean_operations/images/operations_image060.png,"Vertex/Solid Interference",220}
+
-@subsubsection specification__boolean_3_1_8 Edge/Soild Interference
+
For an edge *Ei* and a solid *Zj* there is Edge/Solid interference if the edge *Ei* and its sub-shapes have no BRep interferences with any sub-shape of *Zj* and *Ei* is completely inside the solid *Zj*.
-@figure{/specification/boolean_operations/images/operations_image061.png,"Edge/Solid Interference",220}
+
-@subsubsection specification__boolean_3_1_9 Face/Soild Interference
+
For a face *Fi* and a solid *Zj* there is Face/Solid interference if the face *Fi* and its sub-shapes have no BRep interferences with any sub-shape of *Zj* and *Fi* is completely inside the solid *Zj*.
-@figure{/specification/boolean_operations/images/operations_image062.png,"Face/Solid Interference",220}
+
-@subsubsection specification__boolean_3_1_10 Solid/Soild Interference
+
For a solid *Zi* and a solid *Zj* there is Solid/Solid interference if the solid *Zi* and its sub-shapes have no BRep interferences with any sub-shape of *Zj* and *Zi* is completely inside the solid *Zj*.
-@figure{/specification/boolean_operations/images/operations_image063.png,"Solid/Solid Interference",220}
+
-@subsubsection specification__boolean_3_1_11 Computation Order
+
The interferences between shapes are computed on the basis of increasing of the dimension value of the shape in the following order:
* Vertex/Vertex,
@@ -290,13 +287,13 @@ The interferences between shapes are computed on the basis of increasing of the
This order allows avoiding the computation of redundant interferences between upper-level shapes *Si* and *Sj* when there are interferences between lower sub-shapes *Sik* and *Sjm*.
-@subsubsection specification__boolean_3_1_12 Results
+
* The result of the interference is a shape that can be either interfered shape itself (or its part) or a new shape.
* The result of the interference is a shape with the dimension value that is less or equal to the minimal dimension value of interfered shapes. For example, the result of Vertex/Edge interference is a vertex, but not an edge.
* The result of the interference splits the source shapes on the parts each time as it can do that.
-@subsection specification__boolean_3_2 Paves
+
The result of interferences of the type Vertex/Edge, Edge/Edge and Edge/Face in most cases is a vertex (new or old) lying on an edge.
@@ -305,32 +302,32 @@ The result of interferences of the type Face/Face in most cases is intersection
The position of vertex *Vi* on curve *C* can be defined by a value of parameter ti of the 3D point of the vertex on the curve.
Pave *PVi* on curve *C* is a structure containing the vertex *Vi* and correspondent value of the parameter ti of the 3D point of the vertex on the curve. Curve *C* can be a 3D or a 2D curve.
-@figure{/specification/boolean_operations/images/operations_image011.svg,"Paves",340}
+
-Two paves *PV1* and *PV2* on the same curve *C* can be compared using the parameter value @code PV1 > PV2 if t1 > t2 @endcode
+Two paves *PV1* and *PV2* on the same curve *C* can be compared using the parameter value ``` PV1 > PV2 if t1 > t2 ```
The usage of paves allows binding of the vertex to the curve (or any structure that contains a curve: edge, intersection curve).
-@subsection specification__boolean_3_3 Pave Blocks
+
A set of paves *PVi (i=1, 2...nPV)*, where *nPV* is the number of paves] of curve *C* can be sorted in the increasing order using the value of parameter *t* on curve *C*.
A pave block *PBi* is a part of the object (edge, intersection curve) between neighboring paves.
-@figure{/specification/boolean_operations/images/operations_image012.svg,"Pave Blocks",340}
+
Any finite source edge *E* has at least one pave block that contains two paves *PVb* and *PVe*:
* Pave *PVb* corresponds to the vertex *Vb* with minimal parameter tb on the curve of the edge.
* Pave *PVe* corresponds to the vertex *Ve* with maximal parameter te on the curve of the edge.
-@subsection specification__boolean_3_4 Shrunk Range
+
Pave block *PV* of curve *C* is bounded by vertices *V1* and *V2* with tolerance values *Tol(V1)* and *Tol(V2)*. Curve *C* has its own tolerance value *Tol(C)*:
* In case of edge, the tolerance value is the tolerance of the edge.
* In case of intersection curve, the tolerance value is obtained from an intersection algorithm.
-@figure{/specification/boolean_operations/images/operations_image013.svg,"Shrunk Range",340}
+
The theoretical parametric range of the pave block is [t1C, t2C].
@@ -343,20 +340,20 @@ The Figure shows that each tolerance sphere of a vertex can reduce the parametri
The shrunk range of the pave block is the part of 3D curve that can interfere with other shapes.
-@subsection specification__boolean_3_5 Common Blocks
+
The interferences of the type Edge/Edge, Edge/Face produce results as common parts.
In case of Edge/Edge interference the common parts are pave blocks that have different base edges.
-@figure{/specification/boolean_operations/images/operations_image014.svg,"Common Blocks: Edge/Edge interference",340}
+
If the pave blocks PB1, PB2…PBNbPB , where *NbPB* is the number of pave blocks have the same bounding vertices and geometrically coincide, the pave blocks form common block *CB*.
In case of Edge/Face interference the common parts are pave blocks lying on a face(s).
-@figure{/specification/boolean_operations/images/operations_image015.svg,"Common Blocks: Edge/Face interference",265}
+
If the pave blocks *PBi* geometrically coincide with a face *Fj*, the pave blocks form common block *CB*.
@@ -365,7 +362,7 @@ In general case a common block *CB* contains:
* A set of faces *Fj (j=0,1... NbF), NbF* -- number of faces.
-@subsection specification__boolean_3_6 FaceInfo
+
The structure *FaceInfo* contains the following information:
* Pave blocks that have state **In** for the face;
@@ -375,7 +372,7 @@ The structure *FaceInfo* contains the following information:
* Pave blocks built up from intersection curves for the face;
* Vertices built up from intersection points for the face.
-@figure{/specification/boolean_operations/images/operations_image016.svg,"Face Info",420}
+
In the figure, for face *F1*:
* Pave blocks that have state **In** for the face: *PBin1*.
@@ -386,7 +383,7 @@ In the figure, for face *F1*:
* Vertices built up from intersection points for the face: none
-@section specification__boolean_4 Data Structure
+
Data Structure (DS) is used to:
* Store information about input data and intermediate results;
@@ -402,7 +399,7 @@ This information includes:
Data Structure is implemented in the class *BOPDS_DS*.
-@subsection specification__boolean_4_1 Arguments
+
The arguments are shapes (in terms of *TopoDS_Shape*):
* Number of arguments is unlimited.
@@ -425,7 +422,7 @@ The arguments are shapes (in terms of *TopoDS_Shape*):
* There are no restrictions on the type of underlying geometry of the shapes. The faces or edges of arguments *Si* can have underlying geometry of any type supported by Open CASCADE Technology modeling algorithms (in terms of *GeomAbs_CurveType* and *GeomAbs_SurfaceType*).
* The faces or edges of the arguments should have underlying geometry with continuity that is not less than C1.
-@subsection specification__boolean_4_2 Shapes
+
The information about Shapes is stored in structure *BOPDS_ShapeInfo*. The objects of type *BOPDS_ShapeInfo* are stored in the container of array type. The array allows getting the access to the information by an index (DS index).
The structure *BOPDS_ShapeInfo* has the following contents:
@@ -440,7 +437,7 @@ The structure *BOPDS_ShapeInfo* has the following contents:
| *myReference* | Storage for some auxiliary information |
| *myFlag* | Storage for some auxiliary information |
-@subsection specification__boolean_4_3 Interferences
+
The information about interferences is stored in the instances of classes that are inherited from class BOPDS_Interf.
@@ -473,10 +470,10 @@ The information about interferences is stored in the instances of classes that a
The Figure shows inheritance diagram for *BOPDS_Interf* classes.
-@figure{/specification/boolean_operations/images/operations_image017.svg,"BOPDS_Interf classes",420}
+
-@subsection specification__boolean_4_4 Pave, PaveBlock and CommonBlock
+
The information about the pave is stored in objects of type *BOPDS_Pave*.
@@ -507,11 +504,12 @@ The information about common block is stored in objects of type *BOPDS_CommonBlo
| Name | Contents |
| :---- | :------ |
| *BOPDS_CommonBlock* | |
-| *myPaveBlocks* | The list of pave blocks that are common in terms of @ref specification__boolean_3_5 "Common Blocks" |
+| *myPaveBlocks* | The list of pave blocks that are common in terms of [Common Blocks](#specification__boolean_3_5) |
| *myFaces* | The list of DS indices of the faces, on which the pave blocks lie. |
-@subsection specification__boolean_4_5 Points and Curves
+
+
The information about intersection point is stored in objects of type *BOPDS_Point*.
| Name | Contents |
@@ -530,7 +528,8 @@ The information about intersection curve is stored in objects of type *BOPDS_Cur
| *myPaveBlocks* | The list of pave blocks that belong to the curve |
| *myBox* | The bounding box of the curve (in terms of *Bnd_Box* ) |
-@subsection specification__boolean_4_6 FaceInfo
+
+
The information about *FaceInfo* is stored in a structure *BOPDS_FaceInfo*.
The structure *BOPDS_FaceInfo* has the following contents.
@@ -546,9 +545,10 @@ The structure *BOPDS_FaceInfo* has the following contents.
The objects of type *BOPDS_FaceInfo* are stored in one container of array type. The array allows getting the access to the information by index. This index (if exists) is stored in the field *myReference*.
-@section specification__boolean_root_classes Root Classes
+
+
+
-@subsection specification__boolean_root_classes_1 Class BOPAlgo_Options
The class *BOPAlgo_Options* provides the following options for the algorithms:
* Set the appropriate memory allocator;
* Check the presence of the Errors and Warnings;
@@ -557,14 +557,14 @@ The class *BOPAlgo_Options* provides the following options for the algorithms:
* Break the operations by user request;
* Usage of Oriented Bounding boxes in the operation.
-@subsection specification__boolean_root_classes_2 Class BOPAlgo_Algo
+
The class *BOPAlgo_Algo* provides the base interface for all algorithms:
* Perform the operation;
* Check the input data;
* Check the result.
-@section specification__boolean_5 Intersection Part
+
Intersection Part (IP) is used to
* Initialize the Data Structure;
@@ -577,24 +577,25 @@ Intersection Part (IP) is used to
IP is implemented in the class *BOPAlgo_PaveFiller*.
-@figure{/specification/boolean_operations/images/operations_image064.png,"Diagram for Class BOPAlgo_PaveFiller",230}
+
The description provided in the next paragraphs is coherent with the implementation of the method *BOPAlgo_PaveFiller::Perform()*.
-@subsection specification__boolean_5_1 Initialization
+
+
The input data for the step is the Arguments. The description of initialization step is shown in the Table.
| No | Contents | Implementation |
| :--- | :----- | :----- |
-| 1 | Initialization the array of shapes (in terms of @ref specification__boolean_4_2 "Shapes"). Filling the array of shapes. | *BOPDS_DS::Init()* |
-| 2 | Initialization the array pave blocks (in terms of @ref specification__boolean_4_4 "Pave, PaveBlock, CommonBlock") | *BOPDS_DS::Init()* |
-| 3 | Initialization of intersection Iterator. The intersection Iterator is the object that computes intersections between sub-shapes of the arguments in terms of bounding boxes. The intersection Iterator provides approximate number of the interferences for given type (in terms of @ref specification__boolean_3_1 "Interferences") | *BOPDS_Iterator* |
+| 1 | Initialization the array of shapes (in terms of [Shapes](#specification__boolean_4_2)). Filling the array of shapes. | *BOPDS_DS::Init()* |
+| 2 | Initialization the array pave blocks (in terms of [Pave, PaveBlock, CommonBlock](#specification__boolean_4_4)) | *BOPDS_DS::Init()* |
+| 3 | Initialization of intersection Iterator. The intersection Iterator is the object that computes intersections between sub-shapes of the arguments in terms of bounding boxes. The intersection Iterator provides approximate number of the interferences for given type (in terms of [Interferences](#specification__boolean_3_1)) | *BOPDS_Iterator* |
| 4 | Initialization of intersection Context. The intersection Context is an object that contains geometrical and topological toolkit (classifiers, projectors, etc). The intersection Context is used to cache the tools to increase the algorithm performance. | *IntTools_Context* |
-@subsection specification__boolean_5_2 Compute Vertex/Vertex Interferences
+
-The input data for this step is the DS after the @ref specification__boolean_5_1 "Initialization". The description of this step is shown in the table :
+The input data for this step is the DS after the [Initialization](#specification__boolean_5_1). The description of this step is shown in the table :
| No | Contents | Implementation |
@@ -613,10 +614,10 @@ The input data for this step is the DS after the @ref specification__boolean_5_1
The example of connexity chains of interfered vertices is given in the image:
-@figure{/specification/boolean_operations/images/operations_image018.svg,"Connexity chains of interfered vertices",394}
+
-@subsection specification__boolean_5_3 Compute Vertex/Edge Interferences
+
The input data for this step is the DS after computing Vertex/Vertex interferences.
@@ -624,19 +625,20 @@ The input data for this step is the DS after computing Vertex/Vertex interferenc
| :--- | :--- | :--- |
| 1 | Initialize array of Vertex/Edge interferences | *BOPAlgo_PaveFiller::PerformVE()* |
| 2 | Access to the pairs of interfered shapes (nVi, nEj)k k=0, 1…nk, where *nVi* is DS index of vertex *Vi*, *nEj* is DS index of edge *Ej* and *nk* is the number of pairs. | *BOPDS_Iterator* |
-| 3 | Compute paves. See @ref specification__boolean_3_1_2 "Vertex/Edge Interference" | *BOPInt_Context::ComputeVE()* |
+| 3 | Compute paves. See [Vertex/Edge Interference](#specification__boolean_3_1_2) | *BOPInt_Context::ComputeVE()* |
| 4 | Initialize pave blocks for the edges *Ej* involved in the interference | *BOPDS_DS:: ChangePaveBlocks()* |
-| 5 | Append the paves into the pave blocks in terms of @ref specification__boolean_4_4 "Pave, PaveBlock and CommonBlock" | *BOPDS_PaveBlock:: AppendExtPave()* |
+| 5 | Append the paves into the pave blocks in terms of [Pave, PaveBlock and CommonBlock](#specification__boolean_4_4) | *BOPDS_PaveBlock:: AppendExtPave()* |
| 6 | Append Vertex/Edge interferences in DS | *BOPDS_DS::AddInterf()* |
-@subsection specification__boolean_5_4 Update Pave Blocks
+
+
The input data for this step is the DS after computing Vertex/Edge Interferences.
| No | Contents | Implementation |
| :--- | :---- | :--- |
| 1 | Each pave block PB containing internal paves is split by internal paves into new pave blocks *PBN1, PBN2… PBNn*. PB is replaced by new pave blocks *PBN1, PBN2… PBNn* in the DS. | *BOPDS_DS:: UpdatePaveBlocks()* |
-@subsection specification__boolean_5_5 Compute Edge/Edge Interferences
+
The input data for this step is the DS after updating Pave Blocks.
@@ -646,22 +648,22 @@ The input data for this step is the DS after updating Pave Blocks.
| 2 | Access to the pairs of interfered shapes (nEi, nEj)k, k=0, 1…nk, where *nEi* is DS index of the edge *Ei*, *nEj* is DS index of the edge *Ej* and *nk* is the number of pairs. | *BOPDS_Iterator* |
| 3 | Initialize pave blocks for the edges involved in the interference, if it is necessary. | *BOPDS_DS:: ChangePaveBlocks()* |
| 4 | Access to the pave blocks of interfered shapes: (PBi1, PBi2…PBiNi) for edge *Ei* and (PBj1, PBj2…PBjNj) for edge *Ej* | *BOPAlgo_PaveFiller::PerformEE()* |
-| 5 | Compute shrunk data for pave blocks in terms of @ref specification__boolean_4_4 "Pave, PaveBlock and CommonBlock", if it is necessary. | *BOPAlgo_PaveFiller::FillShrunkData()* |
+| 5 | Compute shrunk data for pave blocks in terms of [Pave, PaveBlock and CommonBlock](#specification__boolean_4_4), if it is necessary. | *BOPAlgo_PaveFiller::FillShrunkData()* |
| 6 | Compute Edge/Edge interference for pave blocks *PBix* and *PBiy*. The result of the computation is a set of objects of type *IntTools_CommonPart* | *IntTools_EdgeEdge* |
| 7.1 | For each *CommonPart* of type *VERTEX:* Create new vertices *VNi (i =1, 2…,NbVN),* where *NbVN* is the number of new vertices. Intersect the vertices *VNi* using the steps Initialization and compute Vertex/Vertex interferences as follows: a) create a new object *PFn* of type *BOPAlgo_PaveFiller* with its own DS; b) use new vertices *VNi (i=1, 2…,NbVN), NbVN* as arguments (in terms of *TopoDs_Shape*) of *PFn*; c) invoke method *Perform()* for *PFn*. The resulting vertices *VNXi (i=1, 2…,NbVNX)*, where *NbVNX* is the number of vertices, are obtained via mapping between *VNi* and the results of *PVn*. | *BOPTools_Tools::MakeNewVertex()* |
| 7.2 | For each *CommonPart* of type *EDGE:* Compute the coinciding connexity chains of pave blocks (PB1C, PB2C… PNnC)k, C=0, 1…nCs, where *nCs* is the number of the connexity chains. Create common blocks (CBc. C=0, 1…nCs) from the chains. Attach the common blocks to the pave blocks. | *BOPAlgo_Tools::PerformCommonBlocks()* |
-| 8 | Post-processing. Append the paves of *VNXi* into the corresponding pave blocks in terms of @ref specification__boolean_4_4 "Pave, PaveBlock and CommonBlock" | *BOPDS_PaveBlock:: AppendExtPave()* |
+| 8 | Post-processing. Append the paves of *VNXi* into the corresponding pave blocks in terms of [Pave, PaveBlock and CommonBlock](#specification__boolean_4_4) | *BOPDS_PaveBlock:: AppendExtPave()* |
| 9 | Split common blocks CBc by the paves. | *BOPDS_DS:: UpdateCommonBlock()* |
| 10 | Append Edge/Edge interferences in the DS. | *BOPDS_DS::AddInterf()* |
The example of coinciding chains of pave blocks is given in the image:
-@figure{/specification/boolean_operations/images/operations_image019.png,"Coinciding chains of pave blocks",420}
+
* The pairs of coincided pave blocks are: (PB11, PB12), (PB11, PB13), (PB12, PB13), (PB21, PB22), (PB21, PB23), (PB22, PB23).
* The pairs produce two chains: (PB11, PB12, PB13) and (PB21, PB22, PB23).
-@subsection specification__boolean_5_6 Compute Vertex/Face Interferences
+
The input data for this step is the DS after computing Edge/Edge interferences.
@@ -669,11 +671,12 @@ The input data for this step is the DS after computing Edge/Edge interferences.
| :---- | :--- | :---- |
| 1 | Initialize array of Vertex/Face interferences | *BOPAlgo_PaveFiller::PerformVF()* |
| 2 | Access to the pairs of interfered shapes (nVi, nFj)k, k=0, 1…nk, where *nVi* is DS index of the vertex *Vi*, *nFj* is DS index of the edge *Fj* and *nk* is the number of pairs. | *BOPDS_Iterator* |
-| 3 | Compute interference See @ref specification__boolean_3_1_3 "Vertex/Face Interference" | *BOPInt_Context::ComputeVF()* |
+| 3 | Compute interference See [Vertex/Face Interference](#specification__boolean_3_1_3) | *BOPInt_Context::ComputeVF()* |
| 4 | Append Vertex/Face interferences in the DS | *BOPDS_DS::AddInterf()* |
| 5 | Repeat steps 2-4 for each new vertex *VNXi (i=1, 2…,NbVNX),* where *NbVNX* is the number of vertices. | *BOPAlgo_PaveFiller::TreatVerticesEE()* |
-@subsection specification__boolean_5_7 Compute Edge/Face Interferences
+
+
The input data for this step is the DS after computing Vertex/Face Interferences.
| No | Contents | Implementation |
@@ -682,17 +685,17 @@ The input data for this step is the DS after computing Vertex/Face Interferences
| 2 | Access to the pairs of interfered shapes (nEi, nFj)k, k=0, 1…nk, where *nEi* is DS index of edge *Ei*, *nFj* is DS index of face *Fj* and *nk* is the number of pairs. | *BOPDS_Iterator* |
| 3 | Initialize pave blocks for the edges involved in the interference, if it is necessary. | *BOPDS_DS::ChangePaveBlocks()* |
| 4 | Access to the pave blocks of interfered edge (PBi1, PBi2…PBiNi) for edge *Ei* | *BOPAlgo_PaveFiller::PerformEF()* |
-| 5 | Compute shrunk data for pave blocks (in terms of @ref specification__boolean_4_4 "Pave, PaveBlock and CommonBlock") if it is necessary. | *BOPAlgo_PaveFiller::FillShrunkData()* |
+| 5 | Compute shrunk data for pave blocks (in terms of [Pave, PaveBlock and CommonBlock](#specification__boolean_4_4)) if it is necessary. | *BOPAlgo_PaveFiller::FillShrunkData()* |
| 6 | Compute Edge/Face interference for pave block *PBix*, and face *nFj*. The result of the computation is a set of objects of type *IntTools_CommonPart* | *IntTools_EdgeFace* |
| 7.1 | For each *CommonPart* of type *VERTEX:* Create new vertices *VNi (i=1, 2…,NbVN),* where *NbVN* is the number of new vertices. Merge vertices *VNi* as follows: a) create new object *PFn* of type *BOPAlgo_PaveFiller* with its own DS; b) use new vertices *VNi (i=1, 2…,NbVN), NbVN* as arguments (in terms of *TopoDs_Shape*) of *PFn*; c) invoke method *Perform()* for *PFn*. The resulting vertices *VNXi (i=1, 2…,NbVNX)*, where *NbVNX* is the number of vertices, are obtained via mapping between *VNi* and the results of *PVn*. | *BOPTools_Tools::MakeNewVertex()* and *BOPAlgo_PaveFiller::PerformVertices1()* |
| 7.2 | For each *CommonPart* of type *EDGE:* Create common blocks (CBc. C=0, 1…nCs) from pave blocks that lie on the faces. Attach the common blocks to the pave blocks. | *BOPAlgo_Tools::PerformCommonBlocks()* |
-| 8 | Post-processing. Append the paves of *VNXi* into the corresponding pave blocks in terms of @ref specification__boolean_4_4 "Pave, PaveBlock and CommonBlock". | *BOPDS_PaveBlock:: AppendExtPave()* |
+| 8 | Post-processing. Append the paves of *VNXi* into the corresponding pave blocks in terms of [Pave, PaveBlock and CommonBlock](#specification__boolean_4_4). | *BOPDS_PaveBlock:: AppendExtPave()* |
| 9 | Split pave blocks and common blocks *CBc* by the paves. | *BOPAlgo_PaveFiller::PerformVertices1()*, *BOPDS_DS:: UpdatePaveBlock()* and *BOPDS_DS:: UpdateCommonBlock()* |
| 10 | Append Edge/Face interferences in the DS | *BOPDS_DS::AddInterf()* |
| 11 | Update *FaceInfo* for all faces having EF common parts. | *BOPDS_DS:: UpdateFaceInfoIn()* |
-@subsection specification__boolean_5_8 Build Split Edges
+
The input data for this step is the DS after computing Edge/Face Interferences.
@@ -700,12 +703,12 @@ For each pave block *PB* take the following steps:
| No | Contents | Implementation |
| :--- | :--- | :--- |
-| 1 | Get the real pave block *PBR*, which is equal to *PB* if *PB* is not a common block and to *PB1* if *PB* is a common block. *PB1* is the first pave block in the pave blocks list of the common block. See @ref specification__boolean_4_4 "Pave, PaveBlock and CommonBlock". | *BOPAlgo_PaveFiller::MakeSplitEdges()* |
+| 1 | Get the real pave block *PBR*, which is equal to *PB* if *PB* is not a common block and to *PB1* if *PB* is a common block. *PB1* is the first pave block in the pave blocks list of the common block. See [Pave, PaveBlock and CommonBlock](#specification__boolean_4_4). | *BOPAlgo_PaveFiller::MakeSplitEdges()* |
| 2 | Build the split edge *Esp* using the information from *DS* and *PBR*. | *BOPTools_Tools::MakeSplitEdge()* |
| 3 | Compute *BOPDS_ShapeInfo* contents for Esp | *BOPAlgo_PaveFiller::MakeSplitEdges()* |
| 4 | Append *BOPDS_ShapeInfo* contents to the DS | *BOPDS_DS::Append()* |
-@subsection specification__boolean_5_9 Compute Face/Face Interferences
+
The input data for this step is DS after building Split Edges.
@@ -716,22 +719,23 @@ The input data for this step is DS after building Split Edges.
| 3 | Compute Face/Face interference | *IntTools_FaceFace* |
| 4 | Append Face/Face interferences in the DS. | *BOPDS_DS::AddInterf()* |
-@subsection specification__boolean_5_10 Build Section Edges
+
The input data for this step is the DS after computing Face/Face interferences.
| No | Contents | Implementation |
| :---- | :---- | :---- |
-| 1 | For each Face/Face interference *nFi, nFj*, retrieve @ref specification__boolean_4_6 "FaceInfo". Create draft vertices from intersection points *VPk (k=1, 2…, NbVP)*, where *NbVP* is the number of new vertices, and the draft vertex *VPk* is created from an intersection point if *VPk ≠ Vm (m = 0, 1, 2… NbVm)*, where *Vm* is an existing vertex for the faces *nFi* and *nF,j* (*On* or *In* in terms of *TopoDs_Shape*), *NbVm* is the number of vertices existing on faces *nFi* and *nF,j* and ≠ -- means non-coincidence in terms of @ref specification__boolean_3_1_1 "Vertex/Vertex interference". | *BOPAlgo_PaveFiller::MakeBlocks()* |
+| 1 | For each Face/Face interference *nFi, nFj*, retrieve [FaceInfo](#specification__boolean_4_6). Create draft vertices from intersection points *VPk (k=1, 2…, NbVP)*, where *NbVP* is the number of new vertices, and the draft vertex *VPk* is created from an intersection point if *VPk ≠ Vm (m = 0, 1, 2… NbVm)*, where *Vm* is an existing vertex for the faces *nFi* and *nF,j* (*On* or *In* in terms of *TopoDs_Shape*), *NbVm* is the number of vertices existing on faces *nFi* and *nF,j* and ≠ -- means non-coincidence in terms of [Vertex/Vertex interference](#specification__boolean_3_1_1). | *BOPAlgo_PaveFiller::MakeBlocks()* |
| 2 | For each intersection curve *Cijk* | |
| 2.1 | Create paves PVc for the curve using existing vertices, i.e. vertices On or In (in terms of *FaceInfo*) for faces *nFi* and *nFj*. Append the paves *PVc* | *BOPAlgo_PaveFiller::PutPaveOnCurve()* and *BOPDS_PaveBlock::AppendExtPave()* |
| 2.2 | Create technological vertices *Vt*, which are the bounding points of an intersection curve (with the value of tolerance *Tol(Cijk)*). Each vertex *Vt* with parameter *Tt* on curve *Cijk* forms pave *PVt* on curve *Cijk*. Append technological paves. | *BOPAlgo_PaveFiller::PutBoundPaveOnCurve()* |
| 2.3 | Create pave blocks *PBk* for the curve using paves (k=1, 2…, NbPB), where *NbPB* is the number of pave blocks | *BOPAlgo_PaveFiller::MakeBlocks()* |
-| 2.4 | Build draft section edges *ESk* using the pave blocks (k=1, 2…, NbES), where *NbES* is the number of draft section edges The draft section edge is created from a pave block *PBk* if *PBk* has state *In* or *On* for both faces *nFi* and *nF,j* and *PBk ≠ PBm (m=0, 1, 2… NbPBm)*, where *PBm* is an existing pave block for faces *nFi* and *nF,j* (*On* or *In* in terms of *FaceInfo*), *NbVm* is the number of existing pave blocks for faces *nFi* and *nF,j* and ≠ -- means non-coincidence (in terms of @ref specification__boolean_3_1_3 "Vertex/Face interference"). | *BOPTools_Tools::MakeEdge()* |
-| 3 | Intersect the draft vertices *VPk (k=1, 2…, NbVP)* and the draft section edges *ESk (k=1, 2…, NbES)*. For this: a) create new object *PFn* of type *BOPAlgo_PaveFiller* with its own DS; b) use vertices *VPk* and edges *ESk* as arguments (in terms of @ref specification__boolean_4_1 "Arguments") of *PFn*; c) invoke method *Perform()* for *PFn*. Resulting vertices *VPXk (k=1, 2… NbVPX)* and edges *ESXk (k=1, 2… NbESX)* are obtained via mapping between *VPk, ESk* and the results of *PVn*. | *BOPAlgo_PaveFiller::PostTreatFF()* |
+| 2.4 | Build draft section edges *ESk* using the pave blocks (k=1, 2…, NbES), where *NbES* is the number of draft section edges The draft section edge is created from a pave block *PBk* if *PBk* has state *In* or *On* for both faces *nFi* and *nF,j* and *PBk ≠ PBm (m=0, 1, 2… NbPBm)*, where *PBm* is an existing pave block for faces *nFi* and *nF,j* (*On* or *In* in terms of *FaceInfo*), *NbVm* is the number of existing pave blocks for faces *nFi* and *nF,j* and ≠ -- means non-coincidence (in terms of [Vertex/Face interference](#specification__boolean_3_1_3)). | *BOPTools_Tools::MakeEdge()* |
+| 3 | Intersect the draft vertices *VPk (k=1, 2…, NbVP)* and the draft section edges *ESk (k=1, 2…, NbES)*. For this: a) create new object *PFn* of type *BOPAlgo_PaveFiller* with its own DS; b) use vertices *VPk* and edges *ESk* as arguments (in terms of [Arguments](#specification__boolean_4_1)) of *PFn*; c) invoke method *Perform()* for *PFn*. Resulting vertices *VPXk (k=1, 2… NbVPX)* and edges *ESXk (k=1, 2… NbESX)* are obtained via mapping between *VPk, ESk* and the results of *PVn*. | *BOPAlgo_PaveFiller::PostTreatFF()* |
| 4 | Update face info (sections about pave blocks and vertices) | *BOPAlgo_PaveFiller::PerformFF()* |
-@subsection specification__boolean_5_11 Build P-Curves
+
+
The input data for this step is the DS after building section edges.
| No | Contents | Implementation |
@@ -739,7 +743,8 @@ The input data for this step is the DS after building section edges.
| 1 | For each Face/Face interference *nFi* and *nFj* build p-Curves on *nFi* and *nFj* for each section edge *ESXk*. | *BOPAlgo_PaveFiller::MakePCurves()* |
| 2 | For each pave block that is common for faces *nFi* and *nFj* build p-Curves on *nFi* and *nFj*. | *BOPAlgo_PaveFiller::MakePCurves()* |
-@subsection specification__boolean_5_12 Process Degenerated Edges
+
+
The input data for this step is the DS after building P-curves.
| No | Contents | Implementation |
@@ -749,7 +754,7 @@ The input data for this step is the DS after building P-curves.
| 2 | Compute paves for the degenerated edge *ED* using a 2D curve of *ED* and a 2D curve of *PBi*. Form pave blocks *PBDi (i=1,2… NbPBD)*, where *NbPBD* is the number of the pave blocks for the degenerated edge *ED* | *BOPAlgo_PaveFiller::FillPaves()* |
| 3 | Build split edges *ESDi (i=1,2…NbESD)*, where *ESD* is the number of split edges, using the pave blocks *PBDi* | *BOPAlgo_PaveFiller:: MakeSplitEdge()* |
-@section specification__boolean_6 General description of the Building Part
+
Building Part (BP) is used to
* Build the result of the operation
@@ -763,17 +768,19 @@ BP is implemented in the following classes:
* *BOPAlgo_Splitter* -- for the Splitter operator.
* *BOPAlgo_CellsBuilder* -- for the Cells Builder operator.
-@figure{/specification/boolean_operations/images/operations_image020.png,"Diagram for BP classes",300}
+
The class *BOPAlgo_BuilderShape* provides the interface for algorithms that have:
* A Shape as the result;
* History information (in terms of \::Generated(), \::Modified() and \::IsDeleted()).
-@section specification__boolean_7 General Fuse Algorithm
-@subsection specification__boolean_7_1 Arguments
-The arguments of the algorithm are shapes (in terms of *TopoDS_Shape*). The main requirements for the arguments are described in @ref specification__boolean_4 "Data Structure" chapter.
+
-@subsection specification__boolean_7_2 Results
+
+
+The arguments of the algorithm are shapes (in terms of *TopoDS_Shape*). The main requirements for the arguments are described in [Data Structure](#specification__boolean_4) chapter.
+
+
During the operation argument *Si* can be split into several parts *Si1, Si2… Si1NbSp*, where *NbSp* is the number of parts. The set (Si1, Si2… Si1NbSp) is an image of argument *Si*.
* The result of the General Fuse operation is a compound. Each sub-shape of the compound corresponds to the certain argument shape S1, S2…Sn and has shared sub-shapes in accordance with interferences between the arguments.
@@ -792,7 +799,7 @@ The types of resulting shapes depend on the type of the corresponding argument p
| 7 | EDGE | Set of split EDGEs | |
| 8 | VERTEX | VERTEX | |
-@subsection specification__boolean_7_3a Options
+
The General Fuse algorithm has a set of options, which allow speeding-up the operation and improving the quality of the result:
* Parallel processing option allows running the algorithm in parallel mode;
@@ -803,9 +810,9 @@ The General Fuse algorithm has a set of options, which allow speeding-up the ope
* Usage of Oriented Bounding Boxes in the operation;
* History support.
-For more detailed information on these options, see the @ref specification__boolean_11a "Advanced options" section.
+For more detailed information on these options, see the [Advanced options](#specification__boolean_11a) section.
-@subsection specification__boolean_7_3b Usage
+
The following example illustrates how to use the GF algorithm:
@@ -904,15 +911,15 @@ bfillds
bbuild result
~~~~
-@subsection specification__boolean_7_3 Examples
+
Have a look at the examples to better understand the definitions.
-@subsubsection specification__boolean_7_3_1 Case 1: Three edges intersecting at a point
+
Let us consider three edges: *E1, E2* and *E3* that intersect in one 3D point.
-@figure{/specification/boolean_operations/images/operations_image021.svg,"Three Intersecting Edges",420}
+
The result of the GFA operation is a compound containing 6 new edges: *E11, E12, E21, E22, E31*, and *E32*. These edges have one shared vertex *Vn1*.
@@ -921,11 +928,11 @@ In this case:
* The argument edge *E2* has resulting split edges *E21* and *E22* (image of *E2*).
* The argument edge *E3* has resulting split edges *E31* and *E32* (image of *E3*).
-@subsubsection specification__boolean_7_3_2 Case 2: Two wires and an edge
+
Let us consider two wires *W1 (Ew11, Ew12, Ew13)* and *W2 (Ew21, Ew22, Ew23)* and edge *E1*.
-@figure{/specification/boolean_operations/images/operations_image022.svg,"Two wires and an edge",420}
+
The result of the GF operation is a compound consisting of 2 wires: *Wn1 (Ew11, En1, En2, En3, Ew13)* and *Wn2 (Ew21, En2, En3, En4, Ew23)* and two edges: *E11* and *E12*.
@@ -935,88 +942,88 @@ In this case :
* The argument edge *E1* has split edges *E11* and *E12*. (image of *E1*).
The edges *En1, En2, En3, En4* and vertex *Vn1* are new shapes created during the operation. Edge *Ew12* has split edges *En1, En2* and *En3* and edge *Ew22* has split edges *En2, En3* and *En4*.
-@subsubsection specification__boolean_7_3_3 Case 3: An edge intersecting with a face
+
Let us consider edge *E1* and face *F2*:
-@figure{/specification/boolean_operations/images/operations_image023.svg,"An edge intersecting with a face",420}
+
The result of the GF operation is a compound consisting of 3 shapes:
* Split edge parts *E11* and *E12* (image of *E1*).
* New face *F21* with internal edge *E12* (image of *F2*).
-@subsubsection specification__boolean_7_3_4 Case 4: An edge lying on a face
+
Let us consider edge *E1* and face *F2*:
-@figure{/specification/boolean_operations/images/operations_image024.svg,"An edge lying on a face",420}
+
The result of the GF operation is a compound consisting of 5 shapes:
* Split edge parts *E11, E12* and *E13* (image of *E1*).
* Split face parts *F21* and *F22* (image of *F2*).
-@subsubsection specification__boolean_7_3_5 Case 5: An edge and a shell
+
Let us consider edge *E1* and shell *Sh2* that consists of 2 faces: *F21* and *F22*
-@figure{/specification/boolean_operations/images/operations_image025.svg,"An edge and a shell",488}
+
The result of the GF operation is a compound consisting of 5 shapes:
* Split edge parts *E11, E12 , E13* and *E14* (image of *E1*).
* Image shell *Sh21* (that contains split face parts *F211, F212, F221* and *F222*).
-@subsubsection specification__boolean_7_3_6 Case 6: A wire and a shell
+
Let us consider wire *W1 (E1, E2, E3, E4)* and shell *Sh2 (F21, F22)*.
-@figure{/specification/boolean_operations/images/operations_image026.svg,"A wire and a shell",427}
+
The result of the GF operation is a compound consisting of 2 shapes:
* Image wire *W11* that consists of split edge parts from wire *W1: E11, E12, E13* and *E14*.
* Image shell *Sh21* that contains split face parts: *F211, F212, F213, F221, F222* and *F223*.
-@subsubsection specification__boolean_7_3_7 Case 7: Three faces
+
-Let us consider 3 faces: *F1, F2* and *F3*. @figure{/specification/boolean_operations/images/operations_image027.png,"Three faces",420}
+Let us consider 3 faces: *F1, F2* and *F3*.
The result of the GF operation is a compound consisting of 7 shapes:
* Split face parts: *Fn1, Fn2, Fn3, Fn4, Fn5, Fn6* and *Fn7*.
-@subsubsection specification__boolean_7_3_8 Case 8: A face and a shell
+
Let us consider shell *Sh1 (F11, F12, F13)* and face *F2*.
-@figure{/specification/boolean_operations/images/operations_image028.png,"A face and a shell",420}
+
The result of the GF operation is a compound consisting of 4 shapes:
* Image shell *Sh11* that consists of split face parts from shell *Sh1: Fn1, Fn2, Fn3, Fn4, Fn5* and *Fn6*.
* Split parts of face *F2: Fn3, Fn6* and *Fn7*.
-@subsubsection specification__boolean_7_3_9 Case 9: A shell and a solid
+
-Let us consider shell *Sh1 (F11, F12…F16)* and solid *So2*. @figure{/specification/boolean_operations/images/operations_image029.png,"A shell and a solid: arguments",220}
+Let us consider shell *Sh1 (F11, F12…F16)* and solid *So2*.
The result of the GF operation is a compound consisting of 2 shapes:
* Image shell *Sh11* consisting of split face parts of *Sh1: Fn1, Fn2 ... Fn8.*
* Solid *So21* with internal shell. (image of *So2*).
-@figure{/specification/boolean_operations/images/operations_image030.png,"A shell and a solid: results",420}
+
-@subsubsection specification__boolean_7_3_10 Case 10: A compound and a solid
+
Let us consider compound *Cm1* consisting of 2 solids *So11* and *So12*) and solid *So2*.
-@figure{/specification/boolean_operations/images/operations_image031.png,"A compound and a solid: arguments",220}
+
The result of the GF operation is a compound consisting of 4 shapes:
* Image compound *Cm11* consisting of split solid parts from *So11* and *So12 (Sn1, Sn2, Sn3, Sn4)*.
* Split parts of solid *So2 (Sn2, Sn3, Sn5)*.
-@figure{/specification/boolean_operations/images/operations_image032.png,"A compound and a solid: results",420}
+
-@subsection specification__boolean_7_4 Class BOPAlgo_Builder
+
GFA is implemented in the class *BOPAlgo_Builder*.
-@subsubsection specification__boolean_7_4_1 Fields
+
The main fields of the class are described in the Table:
@@ -1028,16 +1035,16 @@ The main fields of the class are described in the Table:
| *myImages* | The Map between the source shape and its images |
| *myShapesSD* | The Map between the source shape (or split part of source shape) and the shape (or part of shape) that will be used in result due to same domain property. |
-@subsubsection specification__boolean_7_4_2 Initialization
+
-The input data for this step is a *BOPAlgo_PaveFiller* object (in terms of @ref specification__boolean_5 "Intersection") at the state after @ref specification__boolean_5_12 "Processing of degenerated edges" with the corresponding DS.
+The input data for this step is a *BOPAlgo_PaveFiller* object (in terms of [Intersection](#specification__boolean_5)) at the state after [Processing of degenerated edges](#specification__boolean_5_12) with the corresponding DS.
| No | Contents | Implementation |
| :---- | :---- | :---- |
| 1 | Check the readiness of the DS and *BOPAlgo_PaveFiller*. | *BOPAlgo_Builder::CheckData()* |
| 2 | Build an empty result of type Compound. | *BOPAlgo_Builder::Prepare()* |
-@subsubsection specification__boolean_7_4_3 Build Images for Vertices
+
The input data for this step is *BOPAlgo_Builder* object after Initialization.
@@ -1045,7 +1052,7 @@ The input data for this step is *BOPAlgo_Builder* object after Initialization.
| :--- | :--- | :--- |
| 1 | Fill *myShapesSD* by SD vertices using the information from the DS. | *BOPAlgo_Builder::FillImagesVertices()* |
-@subsubsection specification__boolean_7_4_4 Build Result of Type Vertex
+
The input data for this step is *BOPAlgo_Builder* object after building images for vertices and *Type*, which is the shape type (*TopAbs_VERTEX*).
@@ -1053,7 +1060,7 @@ The input data for this step is *BOPAlgo_Builder* object after building images
| :--- | :--- | :----- |
| 1 | For the arguments of type *Type*. If there is an image for the argument: add the image to the result. If there is no image for the argument: add the argument to the result. | *BOPAlgo_Builder::BuildResult()* |
-@subsubsection specification__boolean_7_4_5 Build Images for Edges
+
The input data for this step is *BOPAlgo_Builder object* after building result of type vertex.
@@ -1061,11 +1068,11 @@ The input data for this step is *BOPAlgo_Builder object* after building result o
| :---- | :---- | :----- |
| 1 | For all pave blocks in the DS. Fill *myImages* for the original edge *E* by split edges *ESPi* from pave blocks. In case of common blocks on edges, use edge *ESPSDj* that corresponds to the leading pave block and fill *myShapesSD* by the pairs *ESPi/ESPSDj*. | *BOPAlgo_Builder::FillImagesEdges()* |
-@subsubsection specification__boolean_7_4_6 Build Result of Type Edge
+
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex", but for the type *Edge*.
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4), but for the type *Edge*.
-@subsubsection specification__boolean_7_4_7 Build Images for Wires
+
The input data for this step is:
* *BOPAlgo_Builder* object after building result of type *Edge*;
@@ -1078,11 +1085,11 @@ The input data for this step is:
| 2 | Add to C the images or non-split parts of the *Original Shape*, taking into account its orientation. | *BOPAlgo_Builder::FillImagesContainers()* *BOPTools_Tools::IsSplitToReverse()* |
| 3 | Fill *myImages* for the *Original Shape* by the information above. | *BOPAlgo_Builder::FillImagesContainers()* |
-@subsubsection specification__boolean_7_4_8 Build Result of Type Wire
+
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex" but for the type *Wire*.
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4) but for the type *Wire*.
-@subsubsection specification__boolean_7_4_9 Build Images for Faces
+
The input data for this step is *BOPAlgo_Builder* object after building result of type *Wire*.
@@ -1092,7 +1099,7 @@ The input data for this step is *BOPAlgo_Builder* object after building result o
| 1.1 | Collect all edges or their images of *Fi(ESPij)*. | *BOPAlgo_Builder::BuildSplitFaces()* |
| 1.2 | Impart to ESPij the orientation to be coherent with the original one. | *BOPAlgo_Builder::BuildSplitFaces()* |
| 1.3 | Collect all section edges *SEk* for *Fi*. | *BOPAlgo_Builder::BuildSplitFaces()* |
-| 1.4 | Build split faces for *Fi (Fi1, Fi2…FiNbSp)*, where *NbSp* is the number of split parts (see @ref specification__boolean_7_2 "Building faces from a set of edges" for more details). | *BOPAlgo_BuilderFace* |
+| 1.4 | Build split faces for *Fi (Fi1, Fi2…FiNbSp)*, where *NbSp* is the number of split parts (see [Building faces from a set of edges](#specification__boolean_7_2) for more details). | *BOPAlgo_BuilderFace* |
| 1.5 | Impart to (Fi1, Fi2…FiNbSp) the orientation coherent with the original face *Fi*. | *BOPAlgo_Builder::BuildSplitFaces()* |
| 1.6 | Fill the map mySplits with *Fi/(Fi1, Fi2…FiNbSp)* | *BOPAlgo_Builder::BuildSplitFaces()* |
| 2 | Fill Same Domain faces | *BOPAlgo_Builder::FillSameDomainFaces* |
@@ -1105,15 +1112,17 @@ The input data for this step is *BOPAlgo_Builder* object after building result o
The example of chains of same domain faces is given in the image:
-@figure{/specification/boolean_operations/images/operations_image033.svg,"Chains of same domain faces",420}
+
* The pairs of same domain faces are: (F11, F21), (F22, F31), (F41, F51) , (F41, F6) and (F51, F6).
* The pairs produce the three chains: (F11, F21), (F22, F31) and (F41, F51, F6).
-@subsubsection specification__boolean_7_4_10 Build Result of Type Face
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex" but for the type *Face*.
+
+
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4) but for the type *Face*.
+
+
-@subsubsection specification__boolean_7_4_11 Build Images for Shells
The input data for this step is:
* *BOPAlgo_Builder* object after building result of type face;
* *Original Shape* -- a Shell;
@@ -1121,10 +1130,11 @@ The input data for this step is:
The procedure is the same as for building images for wires.
-@subsubsection specification__boolean_7_4_12 Build Result of Type Shell
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex" but for the type *Shell*.
+
+
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4) but for the type *Shell*.
-@subsubsection specification__boolean_7_4_13 Build Images for Solids
+
The input data for this step is *BOPAlgo_Builder* object after building result of type *Shell*.
@@ -1134,15 +1144,16 @@ The following procedure is executed for all interfered DS shapes *Si* of type *S
| :--- | :--- | :--- |
| 1 | Collect all images or non-split parts for all faces (FSPij) that have 3D state *In Si*. | *BOPAlgo_Builder::FillIn3DParts ()* |
| 2 | Collect all images or non-split parts for all faces of *Si* | *BOPAlgo_Builder::BuildSplitSolids()* |
-| 3 | Build split solids for *Si -> (Si1, Si2…SiNbSp)*, where *NbSp* is the number of split parts (see @ref specification__boolean_7_2 "Building faces from a set of edges" for more details) | *BOPAlgo_BuilderSolid* |
+| 3 | Build split solids for *Si -> (Si1, Si2…SiNbSp)*, where *NbSp* is the number of split parts (see [Building faces from a set of edges](#specification__boolean_7_2) for more details) | *BOPAlgo_BuilderSolid* |
| 4 | Fill the map Same Domain solids *myShapesSD* | *BOPAlgo_Builder::BuildSplitSolids()* |
| 5 | Fill the map *myImages* | *BOPAlgo_Builder::BuildSplitSolids()* |
| 6 | Add internal vertices to split solids | *BOPAlgo_Builder::FillInternalShapes()* |
-@subsubsection specification__boolean_7_4_14 Build Result of Type Solid
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex", but for the type Solid.
+
+
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4), but for the type Solid.
-@subsubsection specification__boolean_7_4_15 Build Images for Type CompSolid
+
The input data for this step is:
* *BOPAlgo_Builder* object after building result of type solid;
@@ -1151,10 +1162,12 @@ The input data for this step is:
The procedure is the same as for building images for wires.
-@subsubsection specification__boolean_7_4_16 Build Result of Type Compsolid
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex", but for the type Compsolid.
+
+
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4), but for the type Compsolid.
+
+
-@subsubsection specification__boolean_7_4_17 Build Images for Compounds
The input data for this step is as follows:
* *BOPAlgo_Builder* object after building results of type *compsolid*;
* *Original Shape* -- a Compound;
@@ -1162,11 +1175,12 @@ The input data for this step is as follows:
The procedure is the same as for building images for wires.
-@subsubsection specification__boolean_7_4_18 Build Result of Type Compound
+
+
+This step is the same as [Building Result of Type Vertex](#specification__boolean_7_4_4), but for the type Compound.
-This step is the same as @ref specification__boolean_7_4_4 "Building Result of Type Vertex", but for the type Compound.
+
-@subsubsection specification__boolean_7_4_19 Post-Processing
The purpose of the step is to correct tolerances of the result to provide its validity in terms of *BRepCheck_Analyzer.*
The input data for this step is a *BOPAlgo_Builder* object after building result of type compound.
@@ -1177,28 +1191,29 @@ The input data for this step is a *BOPAlgo_Builder* object after building result
| 2 | Correct tolerances of edges on faces | *BOPTools_Tools::CorrectCurveOnSurface()* |
-@section specification__boolean_8 Splitter Algorithm
+
The Splitter algorithm allows splitting a group of arbitrary shapes by another group of arbitrary shapes.
-It is based on the General Fuse algorithm, thus all options of the General Fuse (see @ref specification__boolean_7_3a "GF Options") are also available in this algorithm.
+It is based on the General Fuse algorithm, thus all options of the General Fuse (see [GF Options](#specification__boolean_7_3a)) are also available in this algorithm.
-@subsection specification__boolean_8_1 Arguments
+
* The arguments of the Splitter algorithm are divided into two groups - *Objects* (shapes that will be split) and *Tools* (shapes, by which the *Objects* will be split);
* The requirements for the arguments (both for *Objects* and *Tools*) are the same as for the General Fuse algorithm - there can be any number of arguments of any type in each group, but each argument should be valid and not self-interfered.
-@subsection specification__boolean_8_2 Results
+
* The result of Splitter algorithm contains only the split parts of the shapes included into the group of *Objects*;
* The split parts of the shapes included only into the group of *Tools* are excluded from the result;
* If there are no shapes in the group of *Tools* the result of the operation will be equivalent to the result of General Fuse operation;
* The shapes can be split by other shapes from the same group (if these shapes are interfering).
-@subsection specification__boolean_8_3 Usage
+
-@subsubsection specification__boolean_8_3_1 API
+
On the low level the Splitter algorithm is implemented in class *BOPAlgo_Splitter*. The usage of this algorithm looks as follows:
+
~~~~{.cpp}
BOPAlgo_Splitter aSplitter;
// Setting arguments and tools
@@ -1220,9 +1235,10 @@ if (aSplitter.HasErrors()) { //check error status
const TopoDS_Shape& aResult = aSplitter.Shape(); // result of the operation
~~~~
-@subsubsection specification__boolean_8_3_2 DRAW
+
The command *bsplit* implements the Splitter algorithm in DRAW. Similarly to the *bbuild* command for the General Fuse algorithm, the *bsplit* command should be used after the Pave Filler is filled.
+
~~~~{.cpp}
# s1 s2 s3 - objects
# t1 t2 t3 - tools
@@ -1234,9 +1250,9 @@ bfillds
bsplit result
~~~~
-@subsection specification__boolean_8_4 Examples
+
-@subsubsection specification__boolean_8_4_1 Example 1
+
Splitting a face by the set of edges:
@@ -1277,12 +1293,12 @@ bsplit result
- @figure{/specification/boolean_operations/images/bsplit_image001.png,"Arguments",160} |
- @figure{/specification/boolean_operations/images/bsplit_image002.png,"Result",160} |
+  |
+  |
-@subsubsection specification__boolean_8_4_2 Example 2
+
Splitting a plate by the set of cylinders:
@@ -1311,26 +1327,26 @@ bsplit result
- @figure{/specification/boolean_operations/images/bsplit_image003.png,"Arguments",160} |
- @figure{/specification/boolean_operations/images/bsplit_image004.png,"Result",160} |
+  |
+  |
-@subsubsection specification__boolean_8_4_3 Example 3
+
Splitting shell hull by the planes:
- @figure{/specification/boolean_operations/images/bsplit_image005.png,"Arguments",160} |
- @figure{/specification/boolean_operations/images/bsplit_image006.png,"Results",160} |
+  |
+  |
-@section specification__boolean_9 Boolean Operations Algorithm
+
-@subsection specification__boolean_9_1 Arguments
+
-* The arguments of BOA are shapes in terms of *TopoDS_Shape*. The main requirements for the arguments are described in the @ref specification__boolean_4 "Data Structure"
+* The arguments of BOA are shapes in terms of *TopoDS_Shape*. The main requirements for the arguments are described in the [Data Structure](#specification__boolean_4)
* There are two groups of arguments in BOA:
* Objects (S1=S11, S12, ...);
* Tools (S2=S21, S22, ...).
@@ -1351,7 +1367,7 @@ Splitting shell hull by the planes:
* For Boolean operation Cut the minimal dimension of *S2* should not be less than the maximal dimension of *S1*.
* For Boolean operation Common the arguments can have any dimension.
-@subsection specification__boolean_9_3 Results. General Rules
+
* The result of the Boolean operation is a compound (if defined). Each sub-shape of the compound has shared sub-shapes in accordance with interferences between the arguments.
* The content of the result depends on the type of the operation (Common, Fuse, Cut12, Cut21) and the dimensions of the arguments.
@@ -1370,80 +1386,80 @@ Splitting shell hull by the planes:
* The result of the operation Fuse for the arguments of type COMPSOLID will consist of the compound containing COMPSOLIDs created from connexity blocks of fused solids.
* The result of the operation Common for the arguments of collection type (WIRE, SHELL, COMPSOLID) will consist of the unique containers containing the overlapping parts. For example, the result of Common operation between two fully overlapping wires will be one wire containing all splits of edges. The number of wires in the result of Common operation between two partially overlapping wires will be equal to the number of connexity blocks of overlapping edges.
-@subsection specification__boolean_9_4 Examples
+
-@subsubsection specification__boolean_9_4_1 Case 1: Two Vertices
+
Let us consider two interfering vertices *V1* and *V2*:
-@figure{/specification/boolean_operations/images/boolean_image001.svg,"",160}
+
* The result of *Fuse* operation is the compound that contains new vertex *V*.
-@figure{/specification/boolean_operations/images/boolean_image002.svg,"",160}
+
* The result of *Common* operation is a compound containing new vertex *V*.
* The result of *Cut12* operation is an empty compound.
* The result of *Cut21* operation is an empty compound.
-@subsubsection specification__boolean_9_4_2 Case 2: A Vertex and an Edge
+
Let us consider vertex *V1* and the edge *E2*, that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image004.png,"",230}
+
* The result of *Fuse* operation is result is not defined because the dimension of the vertex (0) is not equal to the dimension of the edge (1).
* The result of *Common* operation is a compound containing vertex *V1* as the argument *V1* has a common part with edge *E2*.
-@figure{/specification/boolean_operations/images/boolean_image005.png,"",230}
+
* The result of *Cut12* operation is an empty compound.
* The result of *Cut21* operation is not defined because the dimension of the vertex (0) is less than the dimension of the edge (1).
-@subsubsection specification__boolean_9_4_3 Case 3: A Vertex and a Face
+
Let us consider vertex *V1* and face *F2*, that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image006.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the vertex (0) is not equal to the dimension of the face (2).
* The result of *Common* operation is a compound containing vertex *V1* as the argument *V1* has a common part with face *F2*.
-@figure{/specification/boolean_operations/images/boolean_image007.png,"",230}
+
* The result of *Cut12* operation is an empty compound.
* The result of *Cut21* operation is not defined because the dimension of the vertex (0) is less than the dimension of the face (2).
-@subsubsection specification__boolean_9_4_4 Case 4: A Vertex and a Solid
+
Let us consider vertex *V1* and solid *S2*, that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image008.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the vertex (0) is not equal to the dimension of the solid (3).
* The result of *Common* operation is a compound containing vertex *V1* as the argument *V1* has a common part with solid *S2*.
-@figure{/specification/boolean_operations/images/boolean_image009.png,"",230}
+
* The result of *Cut12* operation is an empty compound.
* The result of *Cut21* operation is not defined because the dimension of the vertex (0) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_5 Case 5: Two edges intersecting at one point
+
Let us consider edges *E1* and *E2* that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image010.svg,"",230}
+
* The result of *Fuse* operation is a compound containing split parts of arguments i.e. 4 new edges *E11, E12, E21*, and *E22*. These edges have one shared vertex *Vn1*.
In this case:
* argument edge *E1* has resulting split edges *E11* and *E12* (image of *E1*);
* argument edge *E2* has resulting split edges *E21* and *E22* (image of *E2*).
-@figure{/specification/boolean_operations/images/boolean_image011.svg,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (0) of the common part between the edges (vertex) is less than the dimension of the arguments (1).
@@ -1451,19 +1467,19 @@ In this case:
In this case the argument edge *E1* has resulting split edges *E11* and *E12* (image of *E1*).
-@figure{/specification/boolean_operations/images/boolean_image012.svg,"",230}
+
* The result of *Cut21* operation is a compound containing split parts of the argument *E2*, i.e. 2 new edges *E21* and *E12*. These edges have one shared vertex *Vn1*.
In this case the argument edge *E2* has resulting split edges *E21* and *E22* (image of *E2*).
-@figure{/specification/boolean_operations/images/boolean_image013.svg,"",70}
+
-@subsubsection specification__boolean_9_4_6 Case 6: Two edges having a common block
+
Let us consider edges *E1* and *E2* that have a common block:
-@figure{/specification/boolean_operations/images/boolean_image014.svg,"",230}
+
* The result of *Fuse* operation is a compound containing split parts of arguments i.e. 3 new edges *E11*, *E12* and *E22*. These edges have two shared vertices.
In this case:
@@ -1471,27 +1487,27 @@ In this case:
* argument edge *E2* has resulting split edges *E21* and *E22* (image of *E2*);
* edge *E12* is common for the images of *E1* and *E2*.
-@figure{/specification/boolean_operations/images/boolean_image015.svg,"",230}
+
* The result of *Common* operation is a compound containing split parts of arguments i.e. 1 new edge *E12*. In this case edge *E12* is common for the images of *E1* and *E2*.
The common part between the edges (edge) has the same dimension (1) as the dimension of the arguments (1).
-@figure{/specification/boolean_operations/images/boolean_image016.svg,"",230}
+
* The result of *Cut12* operation is a compound containing a split part of argument *E1*, i.e. new edge *E11*.
-@figure{/specification/boolean_operations/images/boolean_image017.svg,"",230}
+
* The result of *Cut21* operation is a compound containing a split part of argument *E2*, i.e. new edge *E22*.
-@figure{/specification/boolean_operations/images/boolean_image018.svg,"",230}
+
-@subsubsection specification__boolean_9_4_7 Case 7: An Edge and a Face intersecting at a point
+
Let us consider edge *E1* and face *F2* that intersect at a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image019.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the edge (1) is not equal to the dimension of the face (2).
@@ -1501,15 +1517,15 @@ Let us consider edge *E1* and face *F2* that intersect at a 3D point:
In this case the argument edge *E1* has no common parts with the face *F2* so the whole image of *E1* is in the result.
-@figure{/specification/boolean_operations/images/boolean_image020.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the edge (1) is less than the dimension of the face (2).
-@subsubsection specification__boolean_9_4_8 Case 8: A Face and an Edge that have a common block
+
Let us consider edge *E1* and face *F2* that have a common block:
-@figure{/specification/boolean_operations/images/boolean_image021.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the edge (1) is not equal to the dimension of the face (2).
@@ -1517,21 +1533,21 @@ Let us consider edge *E1* and face *F2* that have a common block:
In this case the argument edge *E1* has a common part with face *F2* so the corresponding part of the image of *E1* is in the result. The yellow square is not a part of the result. It only shows the place of *F2*.
-@figure{/specification/boolean_operations/images/boolean_image022.png,"",230}
+
* The result of *Cut12* operation is a compound containing split part of the argument *E1*, i.e. new edge *E11*.
In this case the argument edge *E1* has a common part with face *F2* so the corresponding part is not included into the result. The yellow square is not a part of the result. It only shows the place of F2.
-@figure{/specification/boolean_operations/images/boolean_image023.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the edge (1) is less than the dimension of the face (2).
-@subsubsection specification__boolean_9_4_9 Case 9: An Edge and a Solid intersecting at a point
+
Let us consider edge *E1* and solid *S2* that intersect at a point:
-@figure{/specification/boolean_operations/images/boolean_image024.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the edge (1) is not equal to the dimension of the solid (3).
@@ -1539,21 +1555,21 @@ Let us consider edge *E1* and solid *S2* that intersect at a point:
In this case the argument edge *E1* has a common part with solid *S2* so the corresponding part of the image of *E1* is in the result. The yellow square is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image025.png,"",230}
+
* The result of *Cut12* operation is a compound containing split part of the argument *E1*, i.e. new edge *E11*.
In this case the argument edge *E1* has a common part with solid *S2* so the corresponding part is not included into the result. The yellow square is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image071.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the edge (1) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_10 Case 10: An Edge and a Solid that have a common block
+
Let us consider edge *E1* and solid *S2* that have a common block:
-@figure{/specification/boolean_operations/images/boolean_image072.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the edge (1) is not equal to the dimension of the solid (3).
@@ -1561,148 +1577,148 @@ Let us consider edge *E1* and solid *S2* that have a common block:
In this case the argument edge *E1* has a common part with solid *S2* so the corresponding part of the image of *E1* is in the result. The yellow square is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image073.png,"",230}
+
* The result of *Cut12* operation is a compound containing split part of the argument *E1*, i.e. new edge *E11*.
In this case the argument edge *E1* has a common part with solid *S2* so the corresponding part is not included into the result. The yellow square is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image026.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the edge (1) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_11 Case 11: Two intersecting faces
+
Let us consider two intersecting faces *F1* and *F2*:
-@figure{/specification/boolean_operations/images/boolean_image027.png,"",230}
+
* The result of *Fuse* operation is a compound containing split parts of arguments i.e. 2 new faces *F11* and *F21*. These faces have one shared edge *En1*.
-@figure{/specification/boolean_operations/images/boolean_image028.png,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (1) of the common part between *F1* and *F2* (edge) is less than the dimension of arguments (2).
* The result of *Cut12* operation is a compound containing split part of the argument *F1*, i.e. new face *F11*.
-@figure{/specification/boolean_operations/images/boolean_image029.png,"",230}
+
* The result of *Cut21* operation is a compound containing split parts of the argument *F2*, i.e. 1 new face *F21*.
-@figure{/specification/boolean_operations/images/boolean_image030.png,"",127}
+
-@subsubsection specification__boolean_9_4_12 Case 12: Two faces that have a common part
+
Let us consider two faces *F1* and *F2* that have a common part:
-@figure{/specification/boolean_operations/images/boolean_image031.png,"",230}
+
* The result of *Fuse* operation is a compound containing split parts of arguments, i.e. 3 new faces: *F11*, *F12* and *F22*. These faces are shared through edges In this case:
* the argument edge *F1* has resulting split faces *F11* and *F12* (image of *F1*)
* the argument face *F2* has resulting split faces *F12* and *F22* (image of *F2*)
* the face *F12* is common for the images of *F1* and *F2*.
-@figure{/specification/boolean_operations/images/boolean_image032.png,"",230}
+
* The result of *Common* operation is a compound containing split parts of arguments i.e. 1 new face *F12*.
In this case: face *F12* is common for the images of *F1* and *F2*.
The common part between the faces (face) has the same dimension (2) as the dimension of the arguments (2).
-@figure{/specification/boolean_operations/images/boolean_image033.png,"",230}
+
* The result of *Cut12* operation is a compound containing split part of the argument *F1*, i.e. new face *F11*.
-@figure{/specification/boolean_operations/images/boolean_image034.png,"",230}
+
* The result of *Cut21* operation is a compound containing split parts of the argument *F2*, i.e. 1 new face *F21*.
-@figure{/specification/boolean_operations/images/boolean_image035.png,"",230}
+
-@subsubsection specification__boolean_9_4_13 Case 13: Two faces that have a common edge
+
Let us consider two faces *F1* and *F2* that have a common edge:
-@figure{/specification/boolean_operations/images/boolean_image036.png,"",230}
+
* The result of *Fuse* operation is a compound containing split parts of arguments, i.e. 2 new faces: *F11* and *F21*. These faces have one shared edge *En1*.
-@figure{/specification/boolean_operations/images/boolean_image037.png,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (1) of the common part between *F1* and *F2* (edge)is less than the dimension of the arguments (2)
* The result of *Cut12* operation is a compound containing split part of the argument *F1*, i.e. new face *F11*. The vertices are shown just to clarify the fact that the edges are spitted.
-@figure{/specification/boolean_operations/images/boolean_image038.png,"",230}
+
* The result of *Cut21* operation is a compound containing split parts of the argument *F2*, i.e. 1 new face *F21*. The vertices are shown just to clarify the fact that the edges are spitted.
-@figure{/specification/boolean_operations/images/boolean_image039.png,"",230}
+
-@subsubsection specification__boolean_9_4_14 Case 14: Two faces that have a common vertex
+
Let us consider two faces *F1* and *F2* that have a common vertex:
-@figure{/specification/boolean_operations/images/boolean_image040.png,"",230}
+
* The result of *Fuse* operation is a compound containing split parts of arguments, i.e. 2 new faces: *F11* and *F21*. These faces have one shared vertex *Vn1*.
-@figure{/specification/boolean_operations/images/boolean_image041.png,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (0) of the common part between *F1* and *F2* (vertex) is less than the dimension of the arguments (2)
* The result of *Cut12* operation is a compound containing split part of the argument *F1*, i.e. new face *F11*.
-@figure{/specification/boolean_operations/images/boolean_image042.png,"",230}
+
* The result of *Cut21* operation is a compound containing split parts of the argument *F2*, i.e. 1 new face *F21*.
-@figure{/specification/boolean_operations/images/boolean_image043.png,"",230}
+
-@subsubsection specification__boolean_9_4_15 Case 15: A Face and a Solid that have an intersection curve.
+
Let us consider face *F1* and solid *S2* that have an intersection curve:
-@figure{/specification/boolean_operations/images/boolean_image044.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the face (2) is not equal to the dimension of the solid (3).
* The result of *Common* operation is a compound containing split part of the argument *F1*. In this case the argument face *F1* has a common part with solid *S2*, so the corresponding part of the image of *F1* is in the result. The yellow contour is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image045.png,"",230}
+
* The result of *Cut12* operation is a compound containing split part of the argument *F1*. In this case argument face *F1* has a common part with solid *S2* so the corresponding part is not included into the result. The yellow contour is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image046.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the face (2) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_16 Case 16: A Face and a Solid that have overlapping faces.
+
Let us consider face *F1* and solid *S2* that have overlapping faces:
-@figure{/specification/boolean_operations/images/boolean_image047.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the face (2) is not equal to the dimension of the solid (3).
* The result of *Common* operation is a compound containing split part of the argument *F1*. In this case the argument face *F1* has a common part with solid *S2*, so the corresponding part of the image of *F1* is included in the result. The yellow contour is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image048.png,"",230}
+
* The result of *Cut12* operation is a compound containing split part of the argument *F1*. In this case argument face *F1* has a common part with solid *S2* so the corresponding part is not included into the result. The yellow contour is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image049.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the face (2) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_17 Case 17: A Face and a Solid that have overlapping edges.
+
Let us consider face *F1* and solid *S2* that have overlapping edges:
-@figure{/specification/boolean_operations/images/boolean_image050.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the face (2) is not equal to the dimension of the solid (3).
@@ -1710,15 +1726,15 @@ Let us consider face *F1* and solid *S2* that have overlapping edges:
* The result of *Cut12* operation is a compound containing split part of the argument *F1*. In this case argument face *F1* has a common part with solid *S2* so the corresponding part is not included into the result. The yellow contour is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image051.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the face (2) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_18 Case 18: A Face and a Solid that have overlapping vertices.
+
Let us consider face *F1* and solid *S2* that have overlapping vertices:
-@figure{/specification/boolean_operations/images/boolean_image052.png,"",230}
+
* The result of *Fuse* operation is not defined because the dimension of the face (2) is not equal to the dimension of the solid (3).
@@ -1726,136 +1742,136 @@ Let us consider face *F1* and solid *S2* that have overlapping vertices:
* The result of *Cut12* operation is a compound containing split part of the argument *F1*. In this case argument face *F1* has a common part with solid *S2* so the corresponding part is not included into the result. The yellow contour is not a part of the result. It only shows the place of *S2*.
-@figure{/specification/boolean_operations/images/boolean_image053.png,"",230}
+
* The result of *Cut21* operation is not defined because the dimension of the face (2) is less than the dimension of the solid (3).
-@subsubsection specification__boolean_9_4_19 Case 19: Two intersecting Solids.
+
Let us consider two intersecting solids *S1* and *S2*:
-@figure{/specification/boolean_operations/images/boolean_image054.png,"",230}
+
* The result of *Fuse* operation is a compound composed from the split parts of arguments *S11, S12* and *S22* (Cut12, Common, Cut21). All inner webs are removed, so the result is one new solid *R*.
-@figure{/specification/boolean_operations/images/boolean_image055.png,"",230}
+
* The result of *Common* operation is a compound containing split parts of arguments i.e. one new solid *S12*. In this case solid *S12* is common for the images of *S1* and *S2*. The common part between the solids (solid) has the same dimension (3) as the dimension of the arguments (3). The yellow contour is not a part of the result. It only shows the place of *S1*.
-@figure{/specification/boolean_operations/images/boolean_image056.png,"",176}
+
* The result of *Cut12* operation is a compound containing split part of the argument *S1*, i.e. 1 new solid *S11*.
-@figure{/specification/boolean_operations/images/boolean_image057.png,"",230}
+
* The result of *Cut21* operation is a compound containing split part of the argument *S2*, i.e. 1 new solid *S21*.
-@figure{/specification/boolean_operations/images/boolean_image058.png,"",230}
+
-@subsubsection specification__boolean_9_4_20 Case 20: Two Solids that have overlapping faces.
+
Let us consider two solids *S1* and *S2* that have a common part on face:
-@figure{/specification/boolean_operations/images/boolean_image059.png,"",230}
+
* The result of *Fuse* operation is a compound composed from the split parts of arguments *S11, S12* and *S22* (Cut12, Common, Cut21). All inner webs are removed, so the result is one new solid *R*.
-@figure{/specification/boolean_operations/images/boolean_image060.png,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (2) of the common part between *S1* and *S2* (face) is less than the lower dimension of the arguments (3).
* The result of *Cut12* operation is a compound containing split part of the argument *S1*, i.e. 1 new solid *S11*.
-@figure{/specification/boolean_operations/images/boolean_image061.png,"",230}
+
* The result of *Cut21* operation is a compound containing split part of the argument *S2*, i.e. 1 new solid *S21*.
-@figure{/specification/boolean_operations/images/boolean_image062.png,"",230}
+
-@subsubsection specification__boolean_9_4_21 Case 21: Two Solids that have overlapping edges.
+
Let us consider two solids *S1* and *S2* that have overlapping edges:
-@figure{/specification/boolean_operations/images/boolean_image063.png,"",230}
+
* The result of *Fuse* operation is a compound composed from the split parts of arguments i.e. 2 new solids *S11* and *S21*. These solids have one shared edge *En1*.
-@figure{/specification/boolean_operations/images/boolean_image064.png,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (1) of the common part between *S1* and *S2* (edge) is less than the lower dimension of the arguments (3).
* The result of *Cut12* operation is a compound containing split part of the argument *S1*. In this case
argument *S1* has a common part with solid *S2* so the corresponding part is not included into the result.
-@figure{/specification/boolean_operations/images/boolean_image065.png,"",230}
+
* The result of *Cut21* operation is a compound containing split part of the argument *S2*. In this case
argument *S2* has a common part with solid *S1* so the corresponding part is not included into the result.
-@figure{/specification/boolean_operations/images/boolean_image066.png,"",230}
+
-@subsubsection specification__boolean_9_4_22 Case 22: Two Solids that have overlapping vertices.
+
Let us consider two solids *S1* and *S2* that have overlapping vertices:
-@figure{/specification/boolean_operations/images/boolean_image067.png,"",230}
+
* The result of *Fuse* operation is a compound composed from the split parts of arguments i.e. 2 new solids *S11* and *S21*. These solids share *Vn1*.
-@figure{/specification/boolean_operations/images/boolean_image068.png,"",230}
+
* The result of *Common* operation is an empty compound because the dimension (0) of the common part between *S1* and *S2* (vertex) is less than the lower dimension of the arguments (3).
* The result of *Cut12* operation is a compound containing split part of the argument *S1*.
-@figure{/specification/boolean_operations/images/boolean_image069.png,"",230}
+
* The result of *Cut21* operation is a compound containing split part of the argument *S2*.
-@figure{/specification/boolean_operations/images/boolean_image070.png,"",230}
+
-@subsubsection specification__boolean_9_4_23 Case 23: A Shell and a Wire cut by a Solid.
+
Let us consider Shell *Sh* and Wire *W* as the objects and Solid *S* as the tool:
-@figure{/specification/boolean_operations/images/boolean_image136.png,"",230}
+
* The result of *Fuse* operation is not defined as the dimension of the arguments is not the same.
* The result of *Common* operation is a compound containing the parts of the initial Shell and Wire common for the Solid. The new Shell and Wire are created from the objects.
-@figure{/specification/boolean_operations/images/boolean_image137.png,"",230}
+
* The result of *Cut12* operation is a compound containing new Shell and Wire split from the arguments *Sh* and *W*. In this case they have a common part with solid *S* so the corresponding part is not included into the result.
-@figure{/specification/boolean_operations/images/boolean_image138.png,"",230}
+
* The result of *Cut21* operation is not defined as the objects have a lower dimension than the tool.
-@subsubsection specification__boolean_9_4_24 Case 24: Two Wires that have overlapping edges.
+
Let us consider two Wires that have overlapping edges, *W1* is the object and *W2* is the tool:
-@figure{/specification/boolean_operations/images/boolean_image139.png,"",230}
+
* The result of *Fuse* operation is a compound containing two Wires, which share an overlapping edge. The new Wires are created from the objects:
-@figure{/specification/boolean_operations/images/boolean_image140.png,"",230}
+
* The result of *Common* operation is a compound containing one Wire consisting of an overlapping edge. The new Wire is created from the objects:
-@figure{/specification/boolean_operations/images/boolean_image141.png,"",230}
+
* The result of *Cut12* operation is a compound containing a wire split from object *W1*. Its common part with *W2* is not included into the result.
-@figure{/specification/boolean_operations/images/boolean_image142.png,"",230}
+
* The result of *Cut21* operation is a compound containing a wire split from *W2*. Its common part with *W1* is not included into the result.
-@figure{/specification/boolean_operations/images/boolean_image143.png,"",230}
+
-@subsection specification__boolean_9_5 Class BOPAlgo_BOP
+
BOA is implemented in the class *BOPAlgo_BOP*. The main fields of this class are described in the Table:
@@ -1866,9 +1882,9 @@ BOA is implemented in the class *BOPAlgo_BOP*. The main fields of this class are
| *myDims[2]* | The values of the dimensions of the arguments |
| *myRC* | The draft result (shape) |
-The main steps of the *BOPAlgo_BOP* are the same as of @ref specification__boolean_7_4 "BOPAlgo_Builder" except for some aspects described in the next paragraphs.
+The main steps of the *BOPAlgo_BOP* are the same as of [BOPAlgo_Builder](#specification__boolean_7_4) except for some aspects described in the next paragraphs.
-@subsection specification__boolean_9_6 Building Draft Result
+
The input data for this step is as follows:
* *BOPAlgo_BOP* object after building result of type *Compound*;
@@ -1879,7 +1895,7 @@ The input data for this step is as follows:
| 1 | For the Boolean operation *Fuse* add to *myRC* all images of arguments. | *BOPAlgo_BOP::BuildRC()* |
| 2 | For the Boolean operation *Common* or *Cut* add to *myRC* all images of argument *S1* that are *Common* for the Common operation and are *Not Common* for the Cut operation | *BOPAlgo_BOP::BuildRC()* |
-@subsection specification__boolean_9_7 Building the Result
+
The input data for this step is as follows:
* *BOPAlgo_BOP* object the state after building draft result.
@@ -1897,7 +1913,7 @@ The input data for this step is as follows:
| 2.3 | Build solids (SDi) from *SFS*. | *BOPAlgo_BuilderSolid* |
| 2.4 | Add the solids (SDi) to the result | |
-@subsection specification__boolean_bop_on_opensolids Boolean operations on open solids
+
The Boolean operations on open solids are tricky enough that the standard approach of Boolean operations for building the result, based on the splits of solids does not work.
It happens because the algorithm for splitting solids (*BOPAlgo_BuilderSolid*) always tries to create the closed loops (shells) and make solids from them. But if the input solid is not closed, what can be expected from its splits?
@@ -1912,13 +1928,14 @@ From the selected faces the result solids are built. Please note, that the resul
Even with this approach, the correct result of Boolean operation on open solids cannot be always guaranteed.
This is explained by non-manifold nature of open solids: in some cases classification of a face depends on the point of the face chosen for classification.
-@section specification__boolean_10a Section Algorithm
+
-@subsection specification__boolean_10a_1 Arguments
+
The arguments of BOA are shapes in terms of *TopoDS_Shape*. The main requirements for the arguments are described in the Algorithms.
-@subsection specification__boolean_10a_2 Results and general rules
+
+
* The result of Section operation is a compound. Each sub-shape of the compound has shared sub-shapes in accordance with interferences between the arguments.
* The result of Section operation contains shapes that have dimension that is less then 2 i.e. vertices and edges.
* The result of Section operation contains standalone vertices if these vertices do not belong to the edges of the result.
@@ -1927,220 +1944,229 @@ The arguments of BOA are shapes in terms of *TopoDS_Shape*. The main requirement
* The result of Section operation contains vertices that are the result of interferences between vertices and faces.
* The result of Section operation contains edges that are the result of interferences between edges and faces (Common Blocks),
-@subsection specification__boolean_10a_3 Examples
+
-@subsubsection specification__boolean_10a_3_1 Case 1: Two Vertices
+
Let us consider two interfering vertices: *V1* and *V2*.
-@figure{/specification/boolean_operations/images/boolean_image080.png,"",131}
+
The result of *Section* operation is the compound that contains a new vertex *V*.
-@figure{/specification/boolean_operations/images/boolean_image081.png,"",128}
+
-@subsubsection specification__boolean_10a_3_2 Case 1: Case 2: A Vertex and an Edge
+
Let us consider vertex *V1* and the edge *E2*, that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image082.png,"",230}
+
The result of *Section* operation is the compound that contains vertex *V1*.
-@figure{/specification/boolean_operations/images/boolean_image083.png,"",230}
+
+
+
-@subsubsection specification__boolean_10a_3_3 Case 1: Case 2: A Vertex and a Face
Let us consider vertex *V1* and face *F2*, that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image084.png,"",230}
+
The result of *Section* operation is the compound that contains vertex *V1*.
-@figure{/specification/boolean_operations/images/boolean_image085.png,"",230}
+
-@subsubsection specification__boolean_10a_3_4 Case 4: A Vertex and a Solid
+
Let us consider vertex *V1* and solid *Z2*. The vertex *V1* is inside the solid *Z2*.
-@figure{/specification/boolean_operations/images/boolean_image086.png,"",230}
+
The result of *Section* operation is an empty compound.
-@subsubsection specification__boolean_10a_3_5 Case 5: Two edges intersecting at one point
+
Let us consider edges *E1* and *E2*, that intersect in a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image087.png,"",230}
+
The result of *Section* operation is the compound that contains a new vertex *Vnew*.
-@figure{/specification/boolean_operations/images/boolean_image088.png,"",230}
+
-@subsubsection specification__boolean_10a_3_6 Case 6: Two edges having a common block
+
Let us consider edges *E1* and *E2*, that have a common block:
-@figure{/specification/boolean_operations/images/boolean_image089.png,"",230}
+
The result of *Section* operation is the compound that contains a new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image090.png,"",230}
+
-@subsubsection specification__boolean_10a_3_7 Case 7: An Edge and a Face intersecting at a point
+
Let us consider edge *E1* and face *F2*, that intersect at a 3D point:
-@figure{/specification/boolean_operations/images/boolean_image091.png,"",230}
+
The result of *Section* operation is the compound that contains a new vertex *Vnew*.
-@figure{/specification/boolean_operations/images/boolean_image092.png,"",230}
+
-@subsubsection specification__boolean_10a_3_8 Case 8: A Face and an Edge that have a common block
+
Let us consider edge *E1* and face *F2*, that have a common block:
-@figure{/specification/boolean_operations/images/boolean_image093.png,"",230}
+
The result of *Section* operation is the compound that contains new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image094.png,"",230}
+
-@subsubsection specification__boolean_10a_3_9 Case 9: An Edge and a Solid intersecting at a point
+
Let us consider edge *E1* and solid *Z2*, that intersect at a point:
-@figure{/specification/boolean_operations/images/boolean_image095.png,"",230}
+
The result of *Section* operation is the compound that contains a new vertex *Vnew*.
-@figure{/specification/boolean_operations/images/boolean_image096.png,"",230}
+
-@subsubsection specification__boolean_10a_3_10 Case 10: An Edge and a Solid that have a common block
+
Let us consider edge *E1* and solid *Z2*, that have a common block at a face:
-@figure{/specification/boolean_operations/images/boolean_image097.png,"",230}
+
The result of *Section* operation is the compound that contains a new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image098.png,"",230}
+
-@subsubsection specification__boolean_10a_3_11 Case 11: Two intersecting faces
+
Let us consider two intersecting faces *F1* and *F2*:
-@figure{/specification/boolean_operations/images/boolean_image099.png,"",230}
+
The result of *Section* operation is the compound that contains a new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image100.png,"",230}
+
-@subsubsection specification__boolean_10a_3_12 Case 12: Two faces that have a common part
+
Let us consider two faces *F1* and *F2* that have a common part:
-@figure{/specification/boolean_operations/images/boolean_image133.png,"",230}
+
The result of *Section* operation is the compound that contains 4 new edges.
-@figure{/specification/boolean_operations/images/boolean_image134.png,"",230}
+
-@subsubsection specification__boolean_10a_3_13 Case 13: Two faces that have overlapping edges
+
Let us consider two faces *F1* and *F2* that have a overlapping edges:
-@figure{/specification/boolean_operations/images/boolean_image101.png,"",230}
+
The result of *Section* operation is the compound that contains a new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image102.png,"",230}
+
-@subsubsection specification__boolean_10a_3_14 Case 14: Two faces that have overlapping vertices
+
Let us consider two faces *F1* and *F2* that have overlapping vertices:
-@figure{/specification/boolean_operations/images/boolean_image103.png,"",230}
+
The result of *Section* operation is the compound that contains a new vertex *Vnew*.
-@figure{/specification/boolean_operations/images/boolean_image104.png,"",230}
+
-@subsubsection specification__boolean_10a_3_15 Case 15: A Face and a Solid that have an intersection curve
+
Let us consider face *F1* and solid *Z2* that have an intersection curve:
-@figure{/specification/boolean_operations/images/boolean_image105.png,"",230}
+
The result of *Section* operation is the compound that contains new edges.
-@figure{/specification/boolean_operations/images/boolean_image106.png,"",230}
+
-@subsubsection specification__boolean_10a_3_16 Case 16: A Face and a Solid that have overlapping faces.
+
Let us consider face *F1* and solid *Z2* that have overlapping faces:
-@figure{/specification/boolean_operations/images/boolean_image107.png,"",230}
+
The result of *Section* operation is the compound that contains new edges
-@figure{/specification/boolean_operations/images/boolean_image108.png,"",230}
+
-@subsubsection specification__boolean_10a_3_17 Case 17: A Face and a Solid that have overlapping edges.
+
Let us consider face *F1* and solid *Z2* that have a common part on edge:
-@figure{/specification/boolean_operations/images/boolean_image109.png,"",230}
+
The result of *Section* operation is the compound that contains a new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image110.png,"",230}
+
-@subsubsection specification__boolean_10a_3_18 Case 18: A Face and a Solid that have overlapping vertices.
+
Let us consider face *F1* and solid *Z2* that have overlapping vertices:
-@figure{/specification/boolean_operations/images/boolean_image111.png,"",230}
+
The result of *Section* operation is the compound that contains a new vertex *Vnew*.
-@figure{/specification/boolean_operations/images/boolean_image112.png,"",230}
+
-@subsubsection specification__boolean_10a_3_19 Case 19: Two intersecting Solids
+
Let us consider two intersecting solids *Z1* and *Z2*:
-@figure{/specification/boolean_operations/images/boolean_image113.png,"",230}
+
+
The result of *Section* operation is the compound that contains new edges.
-@figure{/specification/boolean_operations/images/boolean_image114.png,"",230}
-@subsubsection specification__boolean_10a_3_20 Case 20: Two Solids that have overlapping faces
+
+
+
Let us consider two solids *Z1* and *Z2* that have a common part on face:
-@figure{/specification/boolean_operations/images/boolean_image115.png,"",230}
+
+
The result of *Section* operation is the compound that contains new edges.
-@figure{/specification/boolean_operations/images/boolean_image116.png,"",230}
+
+
-@subsubsection specification__boolean_10a_3_21 Case 21: Two Solids that have overlapping edges
+
Let us consider two solids *Z1* and *Z2* that have overlapping edges:
-@figure{/specification/boolean_operations/images/boolean_image117.png,"",230}
+
+
The result of *Section* operation is the compound that contains a new edge *Enew*.
-@figure{/specification/boolean_operations/images/boolean_image118.png,"",230}
-@subsubsection specification__boolean_10a_3_22 Case 22: Two Solids that have overlapping vertices
+
+
+
Let us consider two solids *Z1* and *Z2* that have overlapping vertices:
-@figure{/specification/boolean_operations/images/boolean_image119.png,"",230}
+
+
The result of *Section* operation is the compound that contains a new vertex *Vnew*.
-@figure{/specification/boolean_operations/images/boolean_image120.png,"",230}
-@subsection specification__boolean_10a_4 Class BOPAlgo_Section
+
+
+
SA is implemented in the class *BOPAlgo_Section*. The class has no specific fields.
The main steps of the *BOPAlgo_Section* are the same as of *BOPAlgo_Builder* except for the following steps:
@@ -2158,30 +2184,31 @@ The main steps of the *BOPAlgo_Section* are the same as of *BOPAlgo_Builder* ex
* Build Images for Compounds;
Some aspects of building the result are described in the next paragraph
-@subsection specification__boolean_10a_5 Building the Result
+
| No | Contents | Implementation |
| :---- | :---- | :------ |
| 1 | Build the result of the operation using all information contained in *FaceInfo*, Common Block, Shared entities of the arguments, etc. | *BOPAlgo_Section:: BuildSection()* |
-@section specification__boolean_10b Volume Maker Algorithm
+
The Volume Maker algorithm has been designed for building the elementary volumes (solids) from a set of connected, intersecting, or nested shapes. The algorithm can also be useful for splitting solids into parts, or constructing new solid(s) from set of intersecting or connected faces or shells.
The algorithm creates only closed solids. In general case the result solids are non-manifold: fragments of the input shapes (wires, faces) located inside the solids are added as internal sub-shapes to these solids.
But the algorithm allows preventing the addition of the internal for solids parts into result. In this case the result solids will be manifold and not contain any internal parts. However, this option does not prevent from the occurrence of the internal edges or vertices in the faces.
Non-closed faces, free wires etc. located outside of any solid are always excluded from the result.
-The Volume Maker algorithm is implemented in the class BOPAlgo_MakerVolume. It is based on the General Fuse (GF) algorithm. All the options of the GF algorithm (see @ref specification__boolean_7_3a "GF Options") are also available in this algorithm.
+The Volume Maker algorithm is implemented in the class BOPAlgo_MakerVolume. It is based on the General Fuse (GF) algorithm. All the options of the GF algorithm (see [GF Options](#specification__boolean_7_3a)) are also available in this algorithm.
The requirements for the arguments are the same as for the arguments of GF algorithm - they could be of any type, but each argument should be valid and not self-interfered.
The algorithm allows disabling the calculation of intersections among the arguments. In this case the algorithm will run much faster, but the user should guarantee that the arguments do not interfere with each other, otherwise the result will be invalid (e.g. contain unexpected parts) or empty.
This option is useful e.g. for building a solid from the faces of one shell or from the shapes that have already been intersected.
-@subsection specification__boolean_10b_1 Usage
+
#### C++ Level
The usage of the algorithm on the API level:
+
~~~~{.cpp}
BOPAlgo_MakerVolume aMV;
// Set the arguments
@@ -2206,6 +2233,7 @@ const TopoDS_Shape& aResult = aMV.Shape(); // result of the operation
#### Tcl Level
To use the algorithm in Draw the command mkvolume has been implemented. The usage of this command is following:
+
~~~~{.php}
Usage: mkvolume r b1 b2 ... [-c] [-ni] [-ai]
Options:
@@ -2214,15 +2242,15 @@ Options:
-ai - use this option to avoid internal for solids shapes in the result.
~~~~
-@subsection specification__boolean_10b_2 Examples
+
#### Example 1
Creation of 9832 solids from sphere and set of 63 planes:
- @figure{/specification/boolean_operations/images/mkvolume_image001.png,"Arguments",200} |
- @figure{/specification/boolean_operations/images/mkvolume_image002.png,"Results",200} |
+  |
+  |
@@ -2231,12 +2259,12 @@ Creating compartments on a ship defined by hull shell and a set of planes. The s
- @figure{/specification/boolean_operations/images/mkvolume_image003.png,"Arguments",200} |
- @figure{/specification/boolean_operations/images/mkvolume_image004.png,"Results",200} |
+  |
+  |
-@section specification__boolean_10c_Cells Cells Builder algorithm
+
The Cells Builder algorithm is an extension of the General Fuse algorithm. The result of General Fuse algorithm contains all split parts of the arguments. The Cells Builder algorithm provides means to specify if any given split part of the arguments (referred to as Cell) can be taken or avoided in the result.
@@ -2250,11 +2278,11 @@ The Cells Builder algorithm also provides the possibility to remove any internal
The algorithm can also create containers from the connected Cells added into result - WIRES from Edges, SHELLS from Faces and COMPSOLIDS from Solids.
-@subsection specification__boolean_10c_Cells_1 Usage
+
The algorithm has been implemented in the *BOPAlgo_CellsBuilder* class.
-Cells Builder is based on the General Fuse algorithm. Thus all options of the General Fuse algorithm (see @ref specification__boolean_7_3a "GF Options") are also available in this algorithm.
+Cells Builder is based on the General Fuse algorithm. Thus all options of the General Fuse algorithm (see [GF Options](#specification__boolean_7_3a)) are also available in this algorithm.
The requirements for the input shapes are the same as for General Fuse - each argument should be valid in terms of *BRepCheck_Analyzer* and *BOPAlgo_ArgumentAnalyzer*.
@@ -2309,6 +2337,7 @@ aResult = aCBuilder.Shape(); // the result
#### DRAW usage
The following set of new commands has been implemented to run the algorithm in DRAW Test Harness:
+
~~~~{.php}
bcbuild : Initialization of the Cells Builder. Use: *bcbuild r*
bcadd : Add parts to result. Use: *bcadd r s1 (0,1) s2 (0,1) ... [-m material [-u]]*
@@ -2320,6 +2349,7 @@ bcmakecontainers : Make containers from the parts added to result. Use: *bcmakec
~~~~
Here is the example of the algorithm use on the DRAW level:
+
~~~~{.php}
psphere s1 15
psphere s2 15
@@ -2340,9 +2370,10 @@ bcadd res s1 1 s2 0 s3 1 -m 1
bcremoveint res
~~~~
-@subsection specification__boolean_10c_Cells_2 Examples
+
The following simple example illustrates the possibilities of the algorithm working on a cylinder and a sphere intersected by a plane:
+
~~~~{.php}
pcylinder c 10 30
psphere s 15
@@ -2351,7 +2382,7 @@ plane p 0 0 20 1 0 0
mkface f p -25 30 -17 17
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_001.png,"Arguments",160}
+
~~~~{.php}
bclearobjects
@@ -2368,7 +2399,7 @@ bcremoveall
bcadd res c 1 s 1 f 1
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_002.png,"The result of COMMON operation",126}
+
#### 2. Common between cylinder and face
@@ -2377,7 +2408,7 @@ bcremoveall
bcadd res f 1 c 1
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_003.png,"The result of COMMON operation between cylinder and face",90}
+
#### 3. Common between cylinder and sphere
@@ -2386,7 +2417,7 @@ bcremoveall
bcadd res c 1 s 1
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_004.png,"The result of COMMON operation between cylinder and sphere",120}
+
#### 4. Fuse of cylinder and sphere
@@ -2397,7 +2428,7 @@ bcadd res s 1 -m 1
bcremoveint res
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_005.png,"The result of FUSE operation between cylinder and sphere",160}
+
#### 5. Parts of the face inside solids - FUSE(COMMON(f, c), COMMON(f, s))
@@ -2407,13 +2438,13 @@ bcadd res f 1 s 1 -m 1
bcadd res f 1 c 1 -m 1
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_006_1.png,"Parts of the face inside solids",160}
+
~~~~{.php}
bcremoveint res
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_006_2.png,"Unified parts of the face inside solids",160}
+
#### 6. Part of the face outside solids
@@ -2422,7 +2453,7 @@ bcremoveall
bcadd res f 1 c 0 s 0
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_007.png,"Part of the face outside solids",160}
+
#### 7. Fuse operation (impossible using standard Boolean Fuse operation)
@@ -2434,13 +2465,13 @@ bcadd res f 1 c 0 s 0
bcremoveint res
~~~~
-@figure{/specification/boolean_operations/images/cells_algorithm_008.png,"Fuse operation",160}
+
These examples may last forever. To define any new operation, it is just necessary to define, which Cells should be taken and which should be avoided.
-@section specification__boolean_10 Algorithm Limitations
+
The chapter describes the problems that are considered as Algorithm limitations. In most cases an Algorithm failure is caused by a combination of various factors, such as self-interfered arguments, inappropriate or ungrounded values of the argument tolerances, adverse mutual position of the arguments, tangency, etc.
@@ -2452,9 +2483,9 @@ A lot of failures of GFA algorithm can be caused by bugs in low-level algorithms
The description below illustrates some known GFA limitations. It does not enumerate exhaustively all problems that can arise in practice. Please address cases of Algorithm failure to the OCCT Maintenance Service.
-@subsection specification__boolean_10_1 Arguments
+
-@subsubsection specification__boolean_10_1_1 Common requirements
+
Each argument should be valid (in terms of *BRepCheck_Analyzer*), or conversely, if the argument is considered as non-valid (in terms of *BRepCheck_Analyzer*), it cannot be used as an argument of the algorithm.
@@ -2476,87 +2507,89 @@ Thus, if *E1* is recognized by the Analyzer as non-valid, edge *E* should also
The fact that the argument is a valid shape (in terms of *BRepCheck_Analyzer*) is a necessary but insufficient requirement to produce a valid result of the Algorithms.
-@subsubsection specification__boolean_10_1_3 Pure self-interference
+
The argument should not be self-interfered, i.e. all sub-shapes of the argument that have geometrical coincidence through any topological entities (vertices, edges, faces) should share these entities.
#### Example 1: Compound of two edges
The compound of two edges *E1* and *E2* is a self-interfered shape and cannot be used as the argument of the Algorithms.
-@figure{/specification/boolean_operations/images/operations_image036.svg,"Compound of two edges",230}
+
#### Example 2: Self-interfered Edge
The edge *E* is a self-interfered shape and cannot be used as an argument of the Algorithms.
-@figure{/specification/boolean_operations/images/operations_image037.svg,"Self-interfered Edge",140}
+
#### Example 3: Self-interfered Face
The face *F* is a self-interfered shape and cannot be used as an argument of the Algorithms.
-@figure{/specification/boolean_operations/images/operations_image038.svg,"Self-interfered Face",230}
+
#### Example 4: Face of Revolution
The face *F* has been obtained by revolution of edge *E* around line *L*.
-@figure{/specification/boolean_operations/images/operations_image039a.png,"Face of Revolution: Arguments",230}
-@figure{/specification/boolean_operations/images/operations_image039b.png,"Face of Revolution: Result",230}
+
+
In spite of the fact that face *F* is valid (in terms of *BRepCheck_Analyzer*) it is a self-interfered shape and cannot be used as the argument of the Algorithms.
-@subsubsection specification__boolean_10_1_4 Self-interferences due to tolerances
+
+
#### Example 1: Non-closed Edge
-Let us consider edge *E* based on a non-closed circle. @figure{/specification/boolean_operations/images/operations_image040.png,"Edge based on a non-closed circle",230}
+Let us consider edge *E* based on a non-closed circle.
The distance between the vertices of *E* is *D=0.69799*. The values of the tolerances *Tol(V1)=Tol(V2)=0.5*.
-@figure{/specification/boolean_operations/images/operations_image041.png,"Distance and Tolerances",230}
+
In spite of the fact that the edge *E* is valid in terms of *BRepCheck_Analyzer*, it is a self-interfered shape because its vertices are interfered. Thus, edge *E* cannot be used as an argument of the Algorithms.
#### Example 2: Solid containing an interfered vertex
-Let us consider solid *S* containing vertex V. @figure{/specification/boolean_operations/images/operations_image042.png,"Solid containing an interfered vertex",230}
+Let us consider solid *S* containing vertex V.
The value of tolerance Tol(V)= 50.000075982061.
-@figure{/specification/boolean_operations/images/operations_image043.png,"Tolerance",230}
+
In spite of the fact that solid *S* is valid in terms of *BRepCheck_Analyzer* it is a self-interfered shape because vertex *V* is interfered with a lot of sub-shapes from *S* without any topological connection with them. Thus solid *S* cannot be used as an argument of the Algorithms.
-@subsubsection specification__boolean_10_1_5 Parametric representation
+
+
The parameterization of some surfaces (cylinder, cone, surface of revolution) can be the cause of limitation.
#### Example 1: Cylindrical surface
The parameterization range for cylindrical surface is:
-@figure{/specification/boolean_operations/images/boolean_image135.png,"",230}
+
The range of *U* coordinate is always restricted while the range of *V* coordinate is non-restricted.
Let us consider a cylinder-based *Face 1* with radii *R=3* and *H=6*.
-@figure{/specification/boolean_operations/images/operations_image044.png,"Face 1",230}
+
-@figure{/specification/boolean_operations/images/operations_image045.png,"P-Curves for Face 1",230}
+
Let us also consider a cylinder-based *Face 2* with radii *R=3000* and *H=6000* (resulting from scaling Face 1 with scale factor *ScF=1000*).
-@figure{/specification/boolean_operations/images/operations_image046.png,"Face 2",230}
+
-@figure{/specification/boolean_operations/images/operations_image047.png,"P-Curves for Face 2",230}
+
Pay attention to the Zoom value of the Figures.
It is obvious that starting with some value of *ScF*, e.g. *ScF>1000000*, all sloped p-Curves on *Face 2* will be almost vertical. At least, there will be no difference between the values of angles computed by standard C Run-Time Library functions, such as *double acos(double x)*. The loss of accuracy in computation of angles can cause failure of some BP sub-algorithms, such as building faces from a set of edges or building solids from a set of faces.
-@subsubsection specification__boolean_10_1_6 Using tolerances of vertices to fix gaps
+
It is possible to create shapes that use sub-shapes of lower order to avoid gaps in the tolerance-based data model.
Let us consider the following example:
-@figure{/specification/boolean_operations/images/operations_image048.png,"Example",230}
+
* Face *F* has two edges *E1* and *E2* and two vertices, the base plane is {0,0,0, 0,0,1};
* Edge *E1* is based on line {0,0,0, 1,0,0}, Tol(E1) = 1.e-7;
@@ -2568,8 +2601,9 @@ Let us consider the following example:
The values of tolerances *Tol(V1)* and *Tol(V2)* are big enough to fix the gaps between the ends of the edges, but the vertices *V1* and *V2* do not contain any information about the trajectories connecting the corresponding ends of the edges. Thus, the trajectories are undefined. This will cause failure of some sub-algorithms of BP. For example, the sub-algorithms for building faces from a set of edges use the information about all edges connected in a vertex. The situation when a vertex has several pairs of edges such as above will not be solved in a right way.
-@subsection specification__boolean_11_1 Intersection problems
-@subsubsection specification__boolean_11_1_1 Pure intersections and common zones
+
+
+
#### Example: Intersecting Edges
@@ -2577,7 +2611,7 @@ Let us consider the intersection between two edges:
* *E1* is based on a line: {0,-10,0, 1,0,0}, Tol(E1)=2.
* *E2* is based on a circle: {0,0,0, 0,0,1}, R=10, Tol(E2)=2.
-@figure{/specification/boolean_operations/images/operations_image049.png,"Intersecting Edges",320}
+
The result of pure intersection between *E1* and *E2* is vertex *Vx {0,-10,0}*.
@@ -2587,7 +2621,7 @@ The Intersection Part of Algorithms uses the result of pure intersection *Vx* in
* The Algorithms do not produce Common Blocks between edges based on underlying curves of explicitly different type (e.g. Line / Circle). If the curves have different types, the rule of thumb is that the produced result is of type **vertex**. This rule does not work for non-analytic curves (Bezier, B-Spline) and their combinations with analytic curves.
* The algorithm of intersection between two surfaces *IntPatch_Intersection* does not compute *CZ* of the intersection between curves and points. So even if *CZ* were computed by Edge/Edge intersection algorithm, its result could not be treated by Face/Face intersection algorithm.
-@subsubsection specification__boolean_11_2_2 Tolerances and inaccuracies
+
The following limitations result from modeling errors or inaccuracies.
@@ -2597,7 +2631,7 @@ Let us consider two planar rectangular faces *F1* and *F2*.
The intersection curve between the planes is curve *C12*. The curve produces a new intersection edge *EC12*. The edge goes through vertices *V1* and *V2* thanks to big tolerance values of vertices *Tol(V1)* and *Tol(V2)*. So, two straight edges *E12* and *EC12* go through two vertices, which is impossible in this case.
-@figure{/specification/boolean_operations/images/operations_image050.svg,"Intersecting Faces",320}
+
The problem cannot be solved in general, because the length of *E12* can be infinite and the values of *Tol(V1)* and *Tol(V2)* theoretically can be infinite too.
@@ -2614,11 +2648,11 @@ Let us consider two edges *E1* and *E2*, which have common vertices *V1* and *V2
*C1* practically coincides in 3D with *C2*. The value of deflection is *Dmax* (e.g. *Dmax=1.e-6*).
-@figure{/specification/boolean_operations/images/operations_image051.svg,"Intersecting Edges",420}
+
The evident and prospective result should be the Common Block between *E1* and *E2*. However, the result of intersection differs.
-@figure{/specification/boolean_operations/images/operations_image052.svg,"Result of Intersection",420}
+
The result contains three new vertices *Vx1, Vx2* and *Vx3*, 8 new edges (V1, Vx1, Vx2, Vx3, V2) and no Common Blocks. This is correct due to the source data: *Tol(E1)=1.e-7, Tol(E2)=1.e-7* and Dmax=1.e-6.
@@ -2628,17 +2662,18 @@ In this particular case the problem can be solved by several ways:
The example can be extended from 1D (edges) to 2D (faces).
-@figure{/specification/boolean_operations/images/operations_image053.svg,"Intersecting Faces",420}
+
The comments and recommendations are the same as for 1D case above.
-@subsubsection specification__boolean_11_2_3 Acquired Self-interferences
+
+
#### Example 1: Vertex and edge
Let us consider vertex *V1* and edge *E2*.
-@figure{/specification/boolean_operations/images/operations_image054.svg,"Vertex and Edge",171}
+
Vertex *V1* interferes with vertices *V12* and *V22*.
So vertex *V21* should interfere with vertex *V22*, which is impossible because vertices *V21* and *V22* are the vertices of edge *E2*, thus *V21* is not equal to *V22*.
@@ -2651,20 +2686,20 @@ In a particular case the problem can be solved by refinement of arguments, i.e.
Let us consider vertex *V2* and wire consisting of edges *E11* and *E12*.
-@figure{/specification/boolean_operations/images/operations_image055.svg,"Vertex and Wire",200}
+
The arguments themselves are not self-intersected.
Vertex *V2* interferes with edges *E11* and *E12*. Thus, edge *E11* should interfere with edge *E22*, but it is impossible because edges *E11* and *E12* cannot interfere by the condition.
The cases when a non-self-interfered argument (or its sub-shapes) become interfered due to the intersections with other arguments (or their sub-shapes) are considered as limitations for the Algorithms.
-@section specification__boolean_11a Advanced Options
+
The previous chapters describe so called Basic Operations. Most of tasks can be solved using Basic Operations. Nonetheless, there are cases that can not be solved straightforwardly by Basic Operations. The tasks are considered as limitations of Basic Operations.
The chapter is devoted to Advanced Options. In some cases the usage of Advanced Options allows overcoming the limitations, improving the quality of the result of operations, robustness and performance of the operators themselves.
-@subsection specification__boolean_11a_1 Fuzzy Boolean Operation
+
Fuzzy Boolean operation is the option of Basic Operations such as General Fuse, Splitting, Boolean, Section, Maker Volume and Cells building operations, in which additional user-specified tolerance is used. This option allows operators to handle robustly cases of touching and near-coincident, misaligned entities of the arguments.
@@ -2676,20 +2711,21 @@ With the Fuzzy option it is possible to get the expected result -- it is just ne
Fuzzy option is included in interface of Intersection Part (class *BOPAlgo_PaveFiller*) and application programming interface (class *BRepAlgoAPI_BooleanOperation*)
-@subsubsection specification__boolean_11a_1_1 Examples
+
+
The following examples demonstrate the advantages of usage Fuzzy option operations over the Basic Operations in typical situations.
#### Case 1
In this example the cylinder (shown in yellow and transparent) is subtracted from the box (shown in red). The cylinder is shifted by 5e-5 relatively to the box along its axis (the distance between rear faces of the box and cylinder is 5e-5).
-@figure{/specification/boolean_operations/images/boolean_image121.png,"",240}
+
The following results are obtained using Basic Operations and the Fuzzy ones with the fuzzy value 5e-5:
-@figure{/specification/boolean_operations/images/boolean_image122.png,"Result of CUT operation obtained with Basic Operations",240}
+
-@figure{/specification/boolean_operations/images/boolean_image123.png,"Result of CUT operation obtained with Fuzzy Option",240}
+
In this example Fuzzy option allows eliminating a very thin part of the result shape produced by Basic algorithm due to misalignment of rear faces of the box and the cylinder.
@@ -2697,13 +2733,13 @@ In this example Fuzzy option allows eliminating a very thin part of the result s
In this example two boxes are fused. One of them has dimensions 10*10*10, and the other is 10*10.000001*10.000001 and adjacent to the first one. There is no gap in this case as the surfaces of the neighboring faces coincide, but one box is slightly greater than the other.
-@figure{/specification/boolean_operations/images/boolean_image124.png,"",240}
+
The following results are obtained using Basic Operations and the Fuzzy ones with the fuzzy value 1e-6:
-@figure{/specification/boolean_operations/images/boolean_image125.png,"Result of CUT operation obtained with Basic Operations",240}
+
-@figure{/specification/boolean_operations/images/boolean_image126.png,"Result of CUT operation obtained with Fuzzy Option",240}
+
In this example Fuzzy option allows eliminating an extremely narrow face in the result produced by Basic operation.
@@ -2711,13 +2747,13 @@ In this example Fuzzy option allows eliminating an extremely narrow face in the
In this example the small planar face (shown in orange) is subtracted from the big one (shown in yellow). There is a gap 1e-5 between the edges of these faces.
-@figure{/specification/boolean_operations/images/boolean_image127.png,"",240}
+
The following results are obtained using Basic Operations and the Fuzzy ones with the fuzzy value 1e-5:
-@figure{/specification/boolean_operations/images/boolean_image128.png,"Result of CUT operation obtained with Basic Operations",240}
+
-@figure{/specification/boolean_operations/images/boolean_image129.png,"Result of CUT operation obtained with Fuzzy Option",240}
+
In this example Fuzzy options eliminated a pin-like protrusion resulting from the gap between edges of the argument faces.
@@ -2725,33 +2761,33 @@ In this example Fuzzy options eliminated a pin-like protrusion resulting from th
In this example the small edge is subtracted from the big one. The edges are overlapping not precisely, with max deviation between them equal to 5.28004e-5. We will use 6e-5 value for Fuzzy option.
-@figure{/specification/boolean_operations/images/boolean_image130.png,"",240}
+
The following results are obtained using Basic Operations and the Fuzzy ones with the fuzzy value 6e-5:
-@figure{/specification/boolean_operations/images/boolean_image131.png,"Result of CUT operation obtained with Basic Operations",240}
+
-@figure{/specification/boolean_operations/images/boolean_image132.png,"Result of CUT operation obtained with Fuzzy Option",240}
+
This example stresses not only the validity, but also the performance issue. The usage of Fuzzy option with the appropriate value allows processing the case much faster than with the pure Basic operation. The performance gain for the case is 45 (Processor: Intel(R) Core(TM) i5-3450 CPU @ 3.10 GHz).
-@subsection specification__boolean_11a_2 Gluing Operation
+
The Gluing operation is the option of the Basic Operations such as General Fuse, Splitting, Boolean, Section, Maker Volume and Cells building operations.
It has been designed to speed up the computation of the interferences among arguments of the operations on special cases, in which the arguments may be overlapping but do not have real intersections between their sub-shapes.
This option cannot be used on the shapes having real intersections, like intersection vertex between edges, or intersection vertex between edge and a face or intersection line between faces:
-@figure{/specification/boolean_operations/images/glue_options_image002.png,"Intersecting faces",240}
+
There are two possibilities of overlapping shapes:
* The shapes can be partially coinciding - the faces do not have intersection curves, but overlapping. The faces of such arguments will be split during the operation. The following picture illustrates such shapes:
-@figure{/specification/boolean_operations/images/glue_options_image001.png,"Partially coinciding faces",240}
+
* The shapes can be fully coinciding - there should be no partial overlapping of the faces, thus no intersection of type EDGE/FACE at all. In such cases the faces will not be split during the operation.
-@figure{/specification/boolean_operations/images/glue_options_image003.png,"Full coinciding faces of the boxes",240}
+
Thus, there are two possible options - for full and partial coincidence of the shapes.
@@ -2763,7 +2799,7 @@ The performance improvement in gluing mode is achieved by excluding the most tim
By setting the Gluing option for the operation user should guarantee that the arguments are really coinciding. The algorithm does not check this itself. Setting inappropriate option for the operation is likely to lead to incorrect result.
-@subsubsection specification__boolean_11a_2_1 Usage
+
The Gluing option is an enumeration implemented in BOPAlgo_GlueEnum.hxx:
* BOPAlgo_GlueOff - default value for the algorithms, Gluing is switched off;
@@ -2792,20 +2828,21 @@ For setting the Gluing options in DRAW it is necessary to call the bglue
bglue 1
~~~~
-@subsubsection specification__boolean_11a_2_2 Examples
+
+
#### Case1 - Fusing the 64 bspline boxes into one solid
-@figure{/specification/boolean_operations/images/glue_options_image004.png,"BSpline Boxes with partial coincidence",240}
+
Performance improvement from using the GlueShift option in this case is about 70 percent.
#### Case2 - Sewing faces of the shape after reading from IGES
-@figure{/specification/boolean_operations/images/glue_options_image005.png,"Faces with coinciding but not shared edges",240}
+
Performance improvement in this case is also about 70 percent.
-@subsection specification__boolean_11a_3 Safe processing mode
+
The safe processing mode is the advanced option in Boolean Operation component. This mode can be applied to all Basic operations such as General Fuse, Splitting, Boolean, Section, Maker Volume, Cells building.
This option allows keeping the input arguments untouched. In other words, switching this option on prevents the input arguments from any modification such as tolerance increase, addition of the P-Curves on edges, etc.
@@ -2816,7 +2853,7 @@ By default the safe processing option is switched off for the algorithms. Enabli
The option is also available in the Intersection algorithm - *BOPAlgo_PaveFiller*. To perform several different operations on the same arguments, the safe processing mode can be enabled in PaveFiller, prepared only once and then used in operations. It is enough to set this option to PaveFiller only and all algorithms taking this PaveFiller will also work in the safe mode.
-@subsubsection specification__boolean_11a_3_1 Usage
+
#### API level
@@ -2840,14 +2877,14 @@ To enable the safe processing mode for the operation in DRAW, it is necessary to
bnondestructive 1
~~~~
-@subsection specification__boolean_11a_4 How to disable check of input solids for inverted status
+
By default, all input solids are checked for inverted status, i.e. the solids are classified to understand if they are holes in the space (negative volumes) or normal solids (positive volumes). The possibility to disable the check of the input solids for inverted status is the advanced option in Boolean Operation component. This option can be applied to all Basic operations, such as General Fuse, Splitting, Boolean, Section, Maker Volume and Cells building.
This option allows avoiding time-consuming classification of the input solids and processing them in the same way as positive volumes, saving up to 10 percent of time on the cases with a big number of input solids.
The classification should be disabled only if the user is sure that there are no negative volumes among the input solids, otherwise the result may be invalid.
-@subsubsection specification__boolean_11a_4_1 Usage
+
#### API level
@@ -2871,11 +2908,11 @@ To enable/disable the classification of the solids in DRAW, it is necessary to c
bcheckinverted 0
~~~~
-@subsection specification__boolean_11a_5_obb Usage of Oriented Bounding Boxes
+
-Since Oriented Bounding Boxes are usually much tighter than Axes Aligned Bounding Boxes (for more information on OBB see the @ref occt_modat_6 "Bounding boxes" chapter of Modeling data User guide) its usage can significantly speed-up the intersection stage of the operation by reducing the number of interfering objects.
+Since Oriented Bounding Boxes are usually much tighter than Axes Aligned Bounding Boxes (for more information on OBB see the [Bounding boxes](modeling_data#occt_modat_6) chapter of Modeling data User guide) its usage can significantly speed-up the intersection stage of the operation by reducing the number of interfering objects.
-@subsubsection specification__boolean_11a_5_obb_1 Usage
+
#### API level
To enable/disable the usage of OBB in the operation it is necessary to call the *SetUseOBB()* method with the appropriate value:
@@ -2893,11 +2930,12 @@ aGF.SetUseOBB(Standard_True);
To enable/disable the usage of OBB in the operation in DRAW it is necessary to call the *buseobb* command with the appropriate value:
* 0 - disabling the usage of OBB;
* 1 - enabling the usage of OBB.
+
~~~~{.php}
buseobb 1
~~~~
-@section specification__boolean_ers Errors and warnings reporting system
+
The chapter describes the Error/Warning reporting system of the algorithms in the Boolean Component.
@@ -2919,6 +2957,7 @@ Note that messages corresponding to errors and warnings are defined in resource
These messages can be localized; for that put translated version to separate file and load it in the application by call to *Message_MsgFile::Load()* .
Here is the example of how to use this system:
+
~~~~{.php}
BOPAlgo_PaveFiller aPF;
aPF.SetArguments(...);
@@ -2939,6 +2978,7 @@ if (aPF.HasErrors()) {
DRAW commands executing Boolean operations output errors and warnings generated by these operations in textual form.
Additional option allows saving shapes for which warnings have been generated, as DRAW variables.
To activate this option, run command *bdrawwarnshapes* with argument 1 (or with 0 to deactivate):
+
~~~~{.php}
bdrawwarnshapes 1
~~~~
@@ -2950,9 +2990,9 @@ Warning: The positioning of the shapes leads to creation of small edges without
~~~~
-@section specification__boolean_history History Information
+
-All operations in Boolean Component support @ref occt_modalg_hist "History information". This chapter describes how the History is filled for these operations.
+All operations in Boolean Component support [History information](modeling_algos#occt_modalg_hist). This chapter describes how the History is filled for these operations.
Additionally to Vertices, Edges and Faces the history is also available for the Solids.
@@ -2966,11 +3006,11 @@ have been obtained as a result of pure intersection (not overlapping) of this sh
So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.
-@subsection specification__boolean_history_ex Examples
+
Here are some examples illustrating the History information.
-@subsubsection specification__boolean_history_ex_del Deleted shapes
+
The result of CUT operation of two overlapping planar faces (see the example below) does not contain any parts from the tool face. Thus, the tool face is considered as Deleted.
If the faces are not fully coinciding, the result must contain some parts of the object face. In this case object face will be considered as not deleted.
@@ -2998,13 +3038,14 @@ isdeleted cut_hist f2
# Deleted
~~~~
-@subsubsection specification__boolean_history_ex_modif Modified shapes
+
In the FUSE operation of two edges intersecting in one point (see the example below), both edges will be split by the intersection point. All these splits will be contained in the result.
Thus, each of the input edges will be Modified into its two splits.
But in the CUT operation on the same edges, the tool edge will be Deleted from the result and, thus, will not have any Modified shapes.
Example of the intersecting edges:
+
~~~~{.php}
line l1 0 0 0 1 0 0
mkedge e1 l1 -10 10
@@ -3045,7 +3086,7 @@ modified m2 cut_hist e2
~~~~
-@subsubsection specification__boolean_history_gen Generated shapes
+
Two intersecting edges will both have the intersection vertices Generated from them.
@@ -3091,7 +3132,7 @@ generated gf2 com_hist f2
~~~~
-@section specification__boolean_simplification BOP result simplification
+
The API algorithms implementing Boolean Operations provide possibility to simplify the result shape by unification of the connected tangential edges and faces.
This simplification is performed by the method *SimplifyResult* which is implemented in the class *BRepAlgoAPI_BuilderAlgo* (General Fuse operation).
@@ -3108,10 +3149,10 @@ Some options of the main operation are passed into the Unifier:
- Fuzzy tolerance of the operation is given to the Unifier as the linear tolerance.
- Non destructive mode here controls the safe input mode in Unifier.
-For controlling this possibility in DRAW the command **bsimplify** has been implemented. See the @ref occt_draw_bop_options "Boolean Operations options" chapter in draw user guide.
+For controlling this possibility in DRAW the command **bsimplify** has been implemented. See the [Boolean Operations options](draw_test_harness#occt_draw_bop_options) chapter in draw user guide.
-@subsection specification__boolean_simplification_examples Examples
+
Here is the simple example of simplification of the result of Fuse operation of two boxes:
@@ -3130,17 +3171,17 @@ bapibop r 1
- @figure{/specification/boolean_operations/images/bop_simple_001.png, "Not simplified result", 420} |
- @figure{/specification/boolean_operations/images/bop_simple_002.png, "Simplified result", 420} |
+  |
+  |
-@section specification__boolean_11b Usage
+
The chapter contains some examples of the OCCT Boolean Component usage. The usage is possible on two levels: C++ and Tcl.
-@subsection specification__boolean_11b_1 Package BRepAlgoAPI
+
The package *BRepAlgoAPI* provides the Application Programming Interface of the Boolean Component.
@@ -3154,11 +3195,12 @@ The package consists of the following classes:
* *BRepAlgoAPI_Cut* -- the class provides Boolean cut operation.
* *BRepAlgoAPI_Section* -- the class provides Boolean section operation.
-@figure{/specification/boolean_operations/images/operations_image065.png,"Diagram of BRepAlgoAPI package",420}
+
The detailed description of the classes can be found in the corresponding .hxx files. The examples are below in this chapter.
-@subsection specification__boolean_11b_2 Package BOPTest
+
+
The package *BOPTest* provides the usage of the Boolean Component on Tcl level. The method *BOPTest::APICommands* contains corresponding Tcl commands:
* *bapibuild* -- for General Fuse Operator;
@@ -3167,7 +3209,7 @@ The package *BOPTest* provides the usage of the Boolean Component on Tcl level.
The examples of how to use the commands are below in this chapter.
-@subsubsection specification__boolean_11b_2_1 Case 1. General Fuse operation
+
The following example illustrates how to use General Fuse operator:
@@ -3225,7 +3267,7 @@ baddobjects b1 b2 b3
bapibuild r
~~~~
-@subsubsection specification__boolean_11b_2_2 Case 2. Splitting operation
+
The following example illustrates how to use the Splitter operator:
@@ -3291,7 +3333,7 @@ baddtools f
bapisplit r
~~~~
-@subsubsection specification__boolean_11b_2_3 Case 3. Common operation
+
The following example illustrates how to use Common operation:
@@ -3358,7 +3400,7 @@ baddtools b2
bapibop r 0
~~~~
-@subsubsection specification__boolean_11b_2_4 Case 4. Fuse operation
+
The following example illustrates how to use Fuse operation:
@@ -3425,7 +3467,7 @@ baddtools b2
bapibop r 1
~~~~
-@subsubsection specification__boolean_11b_2_5 Case 5. Cut operation
+
The following example illustrates how to use Cut operation:
@@ -3493,7 +3535,7 @@ bapibop r 2
~~~~
-@subsubsection specification__boolean_11b_2_6 Case 6. Section operation
+
The following example illustrates how to use Section operation:
diff --git a/dox/specification/brep_format.md b/dox/brep_format.md
similarity index 50%
rename from dox/specification/brep_format.md
rename to dox/brep_format.md
index 4565bb21ac..81555cb826 100644
--- a/dox/specification/brep_format.md
+++ b/dox/brep_format.md
@@ -1,9 +1,6 @@
-BRep Format {#specification__brep_format}
-========================
+# BRep Format
-@tableofcontents
-
-@section specification__brep_format_1 Introduction
+
BREP format is used to store 3D models and allows to store a model which consists
of vertices, edges, wires, faces, shells, solids, compsolids, compounds, edge triangulations,
@@ -25,7 +22,7 @@ Some data fields of the format have additional values, which are used in OCCT.
Some data fields of the format are specific for OCCT.
-@section specification__brep_format_2 Storage of shapes
+
*BRepTools* and *BinTools* packages contain methods *Read* and *Write* allowing to read and write a Shape to/from a stream or a file.
The methods provided by *BRepTools* package use ASCII storage format; *BinTools* package uses binary format.
@@ -42,7 +39,8 @@ The following sample code reads a shape from ASCII file and writes it to a binar
}
~~~~
-@section specification__brep_format_3 Format Common Structure
+
+
ASCII encoding is used to read/write BREP format from/to file. The format data are stored in a file as text data.
@@ -52,13 +50,13 @@ The following sample code reads a shape from ASCII file and writes it to a binar
* \<_\\n\>: = " "*\<\\n\>;
* \<_\>: = " "+; It is a not empty sequence of space characters with ASCII code 21h;
* \: = "0" | "1";
- * \: It is an integer number from -231 to 231-1 which is written in denary system;
- * \: It is a real from -1.7976931348623158 @f$\cdot@f$ 10308 to 1.7976931348623158 @f$\cdot@f$ 10308 which is written in decimal or E form with base 10.The point is used as a delimiter of the integer and fractional parts;
- * \: It is a real from -3.402823 @f$\cdot@f$ 1038 to 3.402823 @f$\cdot@f$ 1038 which is written in decimal or E form with base 10.The point is used as a delimiter of the integer and fractional parts;
+ * \: It is an integer number from -231 to 231-1 which is written in denary system;
+ * \: It is a real from -1.7976931348623158 $\cdot$ 10308 to 1.7976931348623158 $\cdot$ 10308 which is written in decimal or E form with base 10.The point is used as a delimiter of the integer and fractional parts;
+ * \: It is a real from -3.402823 $\cdot$ 1038 to 3.402823 $\cdot$ 1038 which is written in decimal or E form with base 10.The point is used as a delimiter of the integer and fractional parts;
* \<2D point\>: = \\<_\>\;
* \<3D point\>: = \(\<_\>\2;
- * \<2D direction\>: It is a \<2D point\> *x y* so that *x2 + y2* = 1;
- * \<3D direction\>: It is a \<3D point\> *x y z* so that *x2 + y2 + z2* = 1;
+ * \<2D direction\>: It is a \<2D point\> *x y* so that *x2 + y2* = 1;
+ * \<3D direction\>: It is a \<3D point\> *x y z* so that *x2 + y2 + z2* = 1;
* \<+\>: It is an arithmetic operation of addition.
The format consists of the following sections:
@@ -77,26 +75,27 @@ The following sample code reads a shape from ASCII file and writes it to a binar
Sections \, \ and \ are described below in separate chapters of the document.
-@section specification__brep_format_4 Locations
+
+
**Example**
-@verbatim
+```
Locations 3
1
- 0 0 1 0
- 1 0 0 0
- 0 1 0 0
+ 0 0 1 0
+ 1 0 0 0
+ 0 1 0 0
1
- 1 0 0 4
- 0 1 0 5
- 0 0 1 6
- 2 1 1 2 1 0
-@endverbatim
+ 1 0 0 4
+ 0 1 0 5
+ 0 0 1 6
+ 2 1 1 2 1 0
+```
**BNF-like Definition**
-@verbatim
+```
= <_\n> ;
= "Locations" <_> ;
= ;
@@ -106,64 +105,110 @@ The following sample code reads a shape from ASCII file and writes it to a binar
= "2" <_> ;
= ((<_> ) ^ 4 <_\n>) ^ 3;
= ( <_> <_>)* "0" <_\n>;
-@endverbatim
+```
**Description**
\ is interpreted as a 3 x 4 matrix
-@f$Q =
+
+$$
+Q =
\begin{pmatrix}
-{q}_{1,1} &{q}_{1,2} &{q}_{1,3} &{q}_{1,4}\\
-{q}_{2,1} &{q}_{2,2} &{q}_{2,3} &{q}_{2,4}\\
-{q}_{3,1} &{q}_{3,2} &{q}_{3,3} &{q}_{3,4}
-\end{pmatrix}@f$
-which describes transformation of 3 dimensional space and satisfies the following constraints:
- * @f$ d \neq 0@f$ where @f$d = |Q_{2}|@f$ where
- @f$ Q_{2} = \begin{pmatrix}
- {q}_{1,1} &{q}_{1,2} &{q}_{1,3} &{q}_{1,4}\\
- {q}_{2,1} &{q}_{2,2} &{q}_{2,3} &{q}_{2,4}\\
- {q}_{3,1} &{q}_{3,2} &{q}_{3,3} &{q}_{3,4}
- \end{pmatrix}; @f$
- * @f$ Q_{3}^{T} = Q_{3}^{-1}@f$ where @f$Q_{3} = Q_{2}/d^{1/3}. @f$
+q_{1,1} & q_{1,2} & q_{1,3} & q_{1,4}\newline
+q_{2,1} & q_{2,2} & q_{2,3} & q_{2,4}\newline
+q_{3,1} & q_{3,2} & q_{3,3} & q_{3,4}
+\end{pmatrix}
+$$
+
+which describes transformation of 3 dimensional space and satisfies the following constraints:
+
+$$
+d \neq 0 \text{ where } d = |Q_{2}| \text{ where } Q_{2} = \begin{pmatrix}
+q_{1,1} & q_{1,2} & q_{1,3} & q_{1,4} \newline
+q_{2,1} & q_{2,2} & q_{2,3} & q_{2,4} \newline
+q_{3,1} & q_{3,2} & q_{3,3} & q_{3,4}
+\end{pmatrix}
+$$
+
+$$ Q_{3}^{T} = Q_{3}^{-1} \text{ where } Q_{3} = \frac{Q_{2}}{d^{1/3}} $$
The transformation transforms a point (x, y, z) to another point (u, v, w) by the rule:
-@f[ \begin{pmatrix}
-u \\ v \\ w
+
+$$
+\begin{pmatrix}
+u \newline v \newline w
\end{pmatrix} =
Q\cdot(x\;y\;z\;1)^{T} =
\begin{pmatrix}
-{q}_{1,1}\cdot x +{q}_{1,2}\cdot y +{q}_{1,3}\cdot z +{q}_{1,4}\\
-{q}_{2,1}\cdot x +{q}_{2,2}\cdot y +{q}_{2,3}\cdot z +{q}_{2,4}\\
-{q}_{3,1}\cdot x +{q}_{3,2}\cdot y +{q}_{3,3}\cdot z +{q}_{3,4}
-\end{pmatrix} . @f]
+q_{1,1}\cdot x +q_{1,2}\cdot y +q_{1,3}\cdot z +q_{1,4} \newline
+q_{2,1}\cdot x +q_{2,2}\cdot y +q_{2,3}\cdot z +q_{2,4} \newline
+q_{3,1}\cdot x +q_{3,2}\cdot y +q_{3,3}\cdot z +q_{3,4}
+\end{pmatrix}
+$$
*Q* may be a composition of matrices for the following elementary transformations:
* parallel translation --
- @f$ \begin{pmatrix}
- 1 &0 &0 &{q}_{1,4}\\
- 0 &1 &0 &{q}_{2,4}\\
- 0 &0 &1 &{q}_{3,4}
- \end{pmatrix}; @f$
- * rotation around an axis with a direction *D(Dx, Dy, Dz)* by an angle @f$ \varphi @f$ --
- @f[ \begin{pmatrix}
- D_{x}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) - D_{z} \cdot sin(\varphi) &D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{y} \cdot sin(\varphi) &0\\
- D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) + D_{z} \cdot sin(\varphi) &D_{y}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{x} \cdot sin(\varphi) &0\\
- D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{y} \cdot sin(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{x} \cdot sin(\varphi) &D_{z}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &0
- \end{pmatrix}; @f]
+$$\begin{pmatrix}
+1 & 0 & 0 & q_{1,4} \newline
+0 & 1 & 0 & q_{2,4} \newline
+0 & 0 & 1 & q_{3,4}
+\end{pmatrix}$$
+
+ * rotation around an axis with a direction *D(Dx, Dy, Dz)* by an angle $\varphi$ --
+
+$$
+\begin{pmatrix}
+D_{x}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) - D_{z} \cdot sin(\varphi) &D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{y} \cdot sin(\varphi) &0 \newline
+D_{x} \cdot D_{y} \cdot (1-cos(\varphi)) + D_{z} \cdot sin(\varphi) &D_{y}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{x} \cdot sin(\varphi) &0 \newline
+D_{x} \cdot D_{z} \cdot (1-cos(\varphi)) - D_{y} \cdot sin(\varphi) &D_{y} \cdot D_{z} \cdot (1-cos(\varphi)) + D_{x} \cdot sin(\varphi) &D_{z}^{2} \cdot (1-cos(\varphi)) + cos(\varphi) &0
+\end{pmatrix};
+$$
- * scaling -- @f$ \begin{pmatrix} s &0 &0 &0\\ 0 &s &0 &0\\ 0 &0 &s &0 \end{pmatrix} @f$ where @f$ S \in (-\infty,\; \infty)/\left \{ 0 \right \}; @f$
- * central symmetry -- @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}; @f$
- * axis symmetry -- @f$ \begin{pmatrix} -1 &0 &0 &0\\ 0 &-1 &0 &0\\ 0 &0 &1 &0 \end{pmatrix}; @f$
- * plane symmetry -- @f$ \begin{pmatrix} 1 &0 &0 &0\\ 0 &1 &0 &0\\ 0 &0 &-1 &0 \end{pmatrix}. @f$
+ * scaling --
+
+$$
+\begin{pmatrix}
+s & 0 & 0 & 0 \newline
+0 & s & 0 & 0 \newline
+0 & 0 & s & 0
+\end{pmatrix} \text{ where }
+s \in (-\infty, \infty) \setminus \lbrace 0 \rbrace
+$$
+
+ * central symmetry --
+
+$$
+\begin{pmatrix} -1 &0 &0 &0 \newline
+0 &-1 &0 &0 \newline
+0 &0 &-1 &0 \end{pmatrix}
+$$
+
+ * axis symmetry --
+
+$$
+\begin{pmatrix} -1 &0 &0 &0 \newline
+0 &-1 &0 &0 \newline
+0 &0 &1 &0 \end{pmatrix}
+$$
+
+ * plane symmetry --
+
+$$
+\begin{pmatrix}
+1 & 0 & 0 & 0 \newline
+0 & 1 & 0 & 0 \newline
+0 & 0 & -1 & 0
+\end{pmatrix}
+$$
-\ is interpreted as a composition of locations raised to a power and placed above this \ in the section \. \ is a sequence @f$l_{1}p_{1} ... l_{n}p_{n}@f$ of @f$ n \geq 0 @f$ integer pairs @f$ l_{i}p_{i} \; (1 \leq i \leq n) @f$. \ 0 is the indicator of the sequence end. The sequence is interpreted as a composition @f$ L_{l_{1}}^{p_{1}} \cdot ... \cdot L_{l_{n}}^{p_{n}} @f$ where @f$ L_{l_{i}} @f$ is a location from @f$ l_{i} @f$-th \ in the section locations. \ numbering starts from 1.
+\ is interpreted as a composition of locations raised to a power and placed above this \ in the section \. \ is a sequence $l_{1}p_{1} ... l_{n}p_{n}$ of $n \geq 0$ integer pairs $l_{i}p_{i} \; (1 \leq i \leq n)$. \ 0 is the indicator of the sequence end. The sequence is interpreted as a composition $L_{l_{1}}^{p_{1}} \cdot ... \cdot L_{l_{n}}^{p_{n}}$ where $L_{l_{i}}$ is a location from $l_{i}$-th \ in the section locations. \ numbering starts from 1.
-@section specification__brep_format_5 Geometry
+
-@verbatim
+```
=
<2D curves>
<3D curves>
@@ -171,13 +216,14 @@ Q\cdot(x\;y\;z\;1)^{T} =
;
-@endverbatim
+```
-@subsection specification__brep_format_5_1 3D curves
+
+
**Example**
-@verbatim
+```
Curves 13
1 0 0 0 0 0 1
1 0 0 3 -0 1 0
@@ -192,11 +238,11 @@ Q\cdot(x\;y\;z\;1)^{T} =
1 0 2 0 1 0 -0
1 0 2 3 1 0 -0
1 1 0 0 1 0 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<3D curves> = <3D curve header> <_\n> <3D curve records>;
<3D curve header> = "Curves" <_> <3D curve count>;
@@ -215,41 +261,43 @@ Q\cdot(x\;y\;z\;1)^{T} =
<3D curve record 7> |
<3D curve record 8> |
<3D curve record 9>;
- @endverbatim
+```
-@subsubsection specification__brep_format_5_1_1 Line - \<3D curve record 1\>
+
+
**Example**
-@verbatim
+```
1 1 0 3 0 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<3D curve record 1> = "1" <_> <3D point> <_> <3D direction> <_\n>;
-@endverbatim
+```
**Description**
-\<3D curve record 1\> describes a line. The line data consist of a 3D point *P* and a 3D direction *D*. The line passes through the point *P*, has the direction *D* and is defined by the following parametric equation:
+\<3D curve record 1\> describes a line. The line data consist of a 3D point *P* and a 3D direction *D*. The line passes through the point *P*, has the direction *D* and is defined by the following parametric equation:
-@f[ C(u)=P+u \cdot D, \; u \in (-\infty,\; \infty). @f]
-
-The example record is interpreted as a line which passes through a point *P*=(1, 0, 3), has a direction *D*=(0, 1, 0) and is defined by the following parametric equation: @f$ C(u)=(1,0,3)+u \cdot (0,1,0) @f$.
+$$ C(u)=P+u \cdot D, u \in (-\infty, \infty). $$
+
+The example record is interpreted as a line which passes through a point *P*=(1, 0, 3), has a direction *D*=(0, 1, 0) and is defined by the following parametric equation: $C(u)=(1,0,3)+u \cdot (0,1,0)$.
-@subsubsection specification__brep_format_5_1_2 Circle - \<3D curve record 2\>
+
+
**Example**
-@verbatim
+```
2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
-@endverbatim
+```
**BNF-like Definition**
-
+
~~~~{.cpp}
<3D curve record 2> = "2" <_> <3D circle center> <_> <3D circle N> <_> <3D circle Dx> <_> <3D circle Dy> <_> <3D circle radius> <_\n>;
@@ -266,20 +314,21 @@ The example record is interpreted as a line which passes through a point *P*=(1
**Description**
-\<3D curve record 2\> describes a circle. The circle data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dx* and *Dy* and a non-negative real *r*. The circle has a center *P* and is located in a plane with a normal *N*. The circle has a radius *r* and is defined by the following parametric equation:
+\<3D curve record 2\> describes a circle. The circle data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dx* and *Dy* and a non-negative real *r*. The circle has a center *P* and is located in a plane with a normal *N*. The circle has a radius *r* and is defined by the following parametric equation:
-@f[ C(u)=P+r \cdot (cos(u) \cdot D_{x} + sin(u) \cdot D_{y}), \; u \in [o,\;2 \cdot \pi). @f]
+$$ C(u)=P+r \cdot (cos(u) \cdot D_{x} + sin(u) \cdot D_{y}), u \in [o,2 \cdot \pi). $$
-The example record is interpreted as a circle which has its center *P*=(1, 2, 3), is located in plane with a normal *N*=(0, 0 ,1). Directions for the circle are *Dx*=(1, 0 ,0) and *Dy*=(0, 1 ,0). The circle has a radius *r*=4 and is defined by the following parametric equation: @f$ C(u) = (1,2,3) + 4 \cdot ( cos(u) \cdot(1,0,0) + sin(u) \cdot (0,1,0) ) @f$.
+The example record is interpreted as a circle which has its center *P*=(1, 2, 3), is located in plane with a normal *N*=(0, 0 ,1). Directions for the circle are *Dx*=(1, 0 ,0) and *Dy*=(0, 1 ,0). The circle has a radius *r*=4 and is defined by the following parametric equation: $C(u) = (1,2,3) + 4 \cdot ( cos(u) \cdot(1,0,0) + sin(u) \cdot (0,1,0) )$.
-@subsubsection specification__brep_format_5_1_3 Ellipse - \<3D curve record 3\>
+
+
**Example**
-@verbatim
+```
3 1 2 3 0 0 1 1 0 -0 -0 1 0 5 4
-@endverbatim
+```
**BNF-like Definition**
@@ -301,22 +350,26 @@ The example record is interpreted as a circle which has its center *P*=(1, 2, 3
**Description**
-\<3D curve record 3\> describes an ellipse. The ellipse data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dmaj* and *Dmin* and non-negative reals *rmaj* and *rmin* so that *rmin* @f$ \leq @f$ *rmaj*. The ellipse has its center *P*, is located in plane with the normal *N*, has major and minor axis directions *Dmaj* and *Dmin*, major and minor radii *rmaj* and *rmin* and is defined by the following parametric equation:
-
-@f[ C(u)=P+r_{maj} \cdot cos(u) \cdot D_{maj} + r_{min} \cdot sin(u) \cdot D_{min}, u \in [0, 2 \cdot \pi). @f]
-
-The example record is interpreted as an ellipse which has its center *P*=(1, 2, 3), is located in plane with a normal *N*=(0, 0, 1), has major and minor axis directions *Dmaj*=(1, 0, 0) and *Dmin*=(0, 1, 0), major and minor radii *rmaj*=5 and *rmin*=4 and is defined by the following parametric equation: @f$ C(u) = (1,2,3) + 5 \cdot cos(u) \cdot(1,0,0) + 4 \cdot sin(u) \cdot (0,1,0) @f$.
-
+\<3D curve record 3\> describes an ellipse. The ellipse data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dmaj* and *Dmin* and non-negative reals *rmaj* and *rmin* so that *rmin* $\leq$ *rmaj*. The ellipse has its center *P*, is located in plane with the normal *N*, has major and minor axis directions *Dmaj* and *Dmin*, major and minor radii *rmaj* and *rmin* and is defined by the following parametric equation:
-@subsubsection specification__brep_format_5_1_4 Parabola - \<3D curve record 4\>
+$$
+C(u)=P+r_{maj} \cdot cos(u) \cdot D_{maj} + r_{min} \cdot sin(u) \cdot D_{min}, u \in [0, 2 \cdot \pi).
+$$
+
+The example record is interpreted as an ellipse which has its center *P*=(1, 2, 3), is located in plane with a normal *N*=(0, 0, 1), has major and minor axis directions *Dmaj*=(1, 0, 0) and *Dmin*=(0, 1, 0), major and minor radii *rmaj*=5 and *rmin*=4 and is defined by the following parametric equation:
+
+$$ C(u) = (1,2,3) + 5 \cdot cos(u) \cdot(1,0,0) + 4 \cdot sin(u) \cdot (0,1,0) $$
+
+
+
**Example**
-@verbatim
+```
4 1 2 3 0 0 1 1 0 -0 -0 1 0 16
-@endverbatim
+```
-**BNF-like Definition**
+**BNF-like Definition**
~~~~{.cpp}
<3D curve record 4> = "4" <_> <3D parabola origin> <_> <3D parabola N> <_> <3D parabola Dx> <_> <3D parabola Dy> <_> <3D parabola focal length> <_\n>;
@@ -334,23 +387,25 @@ The example record is interpreted as an ellipse which has its center *P*=(1, 2,
**Description**
-\<3D curve record 4\> describes a parabola. The parabola data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dx* and *Dy* and a non-negative real *f*. The parabola is located in plane which passes through the point *P* and has the normal *N*. The parabola has a focus length *f* and is defined by the following parametric equation:
+\<3D curve record 4\> describes a parabola. The parabola data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dx* and *Dy* and a non-negative real *f*. The parabola is located in plane which passes through the point *P* and has the normal *N*. The parabola has a focus length *f* and is defined by the following parametric equation:
-@f[ C(u)=P+\frac{u^{2}}{4 \cdot f} \cdot D_{x} + u \cdot D_{y}, u \in (-\infty,\; \infty) \Leftarrow f \neq 0; @f]
-@f[ C(u)=P+u \cdot D_{x}, u \in (-\infty,\; \infty) \Leftarrow f = 0\;(degenerated\;case). @f]
+$$ C(u)=P+\frac{u^{2}}{4 \cdot f} \cdot D_{x} + u \cdot D_{y}, u \in (-\infty, \infty) \Leftarrow f \neq 0; $$
+
+$$ C(u)=P+u \cdot D_{x}, u \in (-\infty, \infty) \Leftarrow f = 0\;(degenerated\;case). $$
-The example record is interpreted as a parabola in plane which passes through a point *P*=(1, 2, 3) and has a normal *N*=(0, 0, 1). Directions for the parabola are *Dx*=(1, 0, 0) and *Dy*=(0, 1, 0). The parabola has a focus length *f*=16 and is defined by the following parametric equation: @f$ C(u) = (1,2,3) + \frac{u^{2}}{64} \cdot (1,0,0) + u \cdot (0,1,0) @f$.
+The example record is interpreted as a parabola in plane which passes through a point *P*=(1, 2, 3) and has a normal *N*=(0, 0, 1). Directions for the parabola are *Dx*=(1, 0, 0) and *Dy*=(0, 1, 0). The parabola has a focus length *f*=16 and is defined by the following parametric equation: $C(u) = (1,2,3) + \frac{u^{2}}{64} \cdot (1,0,0) + u \cdot (0,1,0)$.
-@subsubsection specification__brep_format_5_1_5 Hyperbola - \<3D curve record 5\>
+
+
**Example**
-@verbatim
+```
5 1 2 3 0 0 1 1 0 -0 -0 1 0 5 4
-@endverbatim
+```
-**BNF-like Definition**
+**BNF-like Definition**
~~~~{.cpp}
<3D curve record 5> = "5" <_> <3D hyperbola origin> <_> <3D hyperbola N> <_> <3D hyperbola Dx> <_> <3D hyperbola Dy> <_> <3D hyperbola Kx> <_> <3D hyperbola Ky> <_\n>;
@@ -370,24 +425,25 @@ The example record is interpreted as a parabola in plane which passes through a
**Description**
-\<3D curve record 5\> describes a hyperbola. The hyperbola data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dx* and *Dy* and non-negative reals *kx* and *ky*. The hyperbola is located in plane which passes through the point *P* and has the normal *N*. The hyperbola is defined by the following parametric equation:
+\<3D curve record 5\> describes a hyperbola. The hyperbola data consist of a 3D point *P*, pairwise orthogonal 3D directions *N*, *Dx* and *Dy* and non-negative reals *kx* and *ky*. The hyperbola is located in plane which passes through the point *P* and has the normal *N*. The hyperbola is defined by the following parametric equation:
-@f[ C(u)=P+k_{x} \cdot cosh(u) \cdot D_{x}+k_{y} \cdot sinh(u) \cdot D_{y} , u \in (-\infty,\; \infty). @f]
+$$ C(u)=P+k_{x} \cdot cosh(u) \cdot D_{x}+k_{y} \cdot sinh(u) \cdot D_{y} , u \in (-\infty, \infty). $$
-The example record is interpreted as a hyperbola in plane which passes through a point *P*=(1, 2, 3) and has a normal *N*=(0, 0, 1). Other hyperbola data are *Dx*=(1, 0, 0), *Dy*=(0, 1, 0), *kx*=5 and *ky*=4. The hyperbola is defined by the following parametric equation: @f$ C(u) = (1,2,3) + 5 \cdot cosh(u) \cdot (1,0,0) +4 \cdot sinh(u) \cdot (0,1,0) @f$.
+The example record is interpreted as a hyperbola in plane which passes through a point *P*=(1, 2, 3) and has a normal *N*=(0, 0, 1). Other hyperbola data are *Dx*=(1, 0, 0), *Dy*=(0, 1, 0), *kx*=5 and *ky*=4. The hyperbola is defined by the following parametric equation: $C(u) = (1,2,3) + 5 \cdot cosh(u) \cdot (1,0,0) +4 \cdot sinh(u) \cdot (0,1,0)$.
-@subsubsection specification__brep_format_5_1_6 Bezier Curve - \<3D curve record 6\>
+
+
**Example**
-@verbatim
- 6 1 2 0 1 0 4 1 -2 0 5 2 3 0 6
-@endverbatim
+```
+ 6 1 2 0 1 0 4 1 -2 0 5 2 3 0 6
+```
**BNF-like Definition**
-@verbatim
+```
<3D curve record 6> = "6" <_> <3D Bezier rational flag> <_> <3D Bezier degree>
<3D Bezier weight poles> <_\n>;
@@ -398,33 +454,34 @@ The example record is interpreted as a hyperbola in plane which passes through
3D Bezier weight poles> = (<_> <3D Bezier weight pole>) ^ (<3D Bezier degree> <+> "1");
<3D Bezier weight pole> = <3D point> [<_> ];
-@endverbatim
+```
**Description**
-\<3D curve record 6\> describes a Bezier curve. The curve data consist of a rational *r*, a degree @f$ m \leq 25 @f$ and weight poles.
+\<3D curve record 6\> describes a Bezier curve. The curve data consist of a rational *r*, a degree $m \leq 25$ and weight poles.
-The weight poles are *m*+1 3D points *B0 ... Bm* if the flag *r* is 0. The weight poles are *m*+1 pairs *B0h0 ... Bmhm* if flag *r* is 1. Here *Bi* is a 3D point and *hi* is a positive real @f$ (0 \leq i \leq m) @f$. @f$ h_{i}=1\; (0 \leq i \leq m) @f$ if the flag *r* is 0.
+The weight poles are *m*+1 3D points *B0 ... Bm* if the flag *r* is 0. The weight poles are *m*+1 pairs *B0h0 ... Bmhm* if flag *r* is 1. Here *Bi* is a 3D point and *hi* is a positive real $(0 \leq i \leq m)$. $h_{i}=1\; (0 \leq i \leq m)$ if the flag *r* is 0.
The Bezier curve is defined by the following parametric equation:
-@f[ C(u) = \frac{\sum_{i=0}^{m}B_{i} \cdot h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}{\sum_{i=0}^{m}h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}},\;u \in [0,\; 1] @f]
-
-where @f$ 0^{0} \equiv 1 @f$.
+$$ C(u) = \frac{\sum_{i=0}^{m}B_{i} \cdot h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}{\sum_{i=0}^{m}h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}},u \in [0, 1] $$
+
+where $0^{0} \equiv 1$.
-The example record is interpreted as a Bezier curve with a rational flag *r*=1, degree *m*=2 and weight poles *B0*=(0, 1, 0), *h0*=4, *B1*=(1, -2, 0), *h1*=5 and *B2*=(2, 3, 0), *h2*=6. The Bezier curve is defined by the following parametric equation:
+The example record is interpreted as a Bezier curve with a rational flag *r*=1, degree *m*=2 and weight poles *B0*=(0, 1, 0), *h0*=4, *B1*=(1, -2, 0), *h1*=5 and *B2*=(2, 3, 0), *h2*=6. The Bezier curve is defined by the following parametric equation:
-@f[ C(u)=\frac{(0,1,0) \cdot 4 \cdot (1-u)^{2}+(1,-2,0) \cdot 5 \cdot 2 \cdot u \cdot (1-u) + (2,3,0) \cdot 6 \cdot u^{2} )}{4 \cdot (1-u)^{2}+5 \cdot 2 \cdot u \cdot (1-u)+6 \cdot u^{2}}. @f]
+$$ C(u)=\frac{(0,1,0) \cdot 4 \cdot (1-u)^{2}+(1,-2,0) \cdot 5 \cdot 2 \cdot u \cdot (1-u) + (2,3,0) \cdot 6 \cdot u^{2} )}{4 \cdot (1-u)^{2}+5 \cdot 2 \cdot u \cdot (1-u)+6 \cdot u^{2}}. $$
-@subsubsection specification__brep_format_5_1_7 B-Spline Curve - \<3D curve record 7\>
+
+
**Example**
-@verbatim
- 7 1 0 1 3 5 0 1 0 4 1 -2 0 5 2 3 0 6
- 0 1 0.25 1 0.5 1 0.75 1 1 1
-@endverbatim
+```
+ 7 1 0 1 3 5 0 1 0 4 1 -2 0 5 2 3 0 6
+ 0 1 0.25 1 0.5 1 0.75 1 1 1
+```
**BNF-like Definition**
@@ -452,45 +509,61 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
**Description**
-\<3D curve record 7\> describes a B-spline curve. The curve data consist of a rational flag *r*, a degree @f$ m \leq 25 @f$, pole count @f$ n \geq 2 @f$, multiplicity knot count *k*, weight poles and multiplicity knots.
-
-The weight poles are *n* 3D points *B1 ... Bn* if the flag *r* is 0. The weight poles are *n* pairs *B1h1 ... Bnhn* if the flag *r* is 1. Here *Bi* is a 3D point and *hi* is a positive real @f$ (1 \leq i \leq n) @f$. @f$ h_{i}=1\; (1 \leq i \leq n) @f$ if the flag *r* is 0.
+\<3D curve record 7\> describes a B-spline curve. The curve data consist of a rational flag *r*, a degree $m \leq 25$, pole count $n \geq 2$, multiplicity knot count *k*, weight poles and multiplicity knots.
-The multiplicity knots are *k* pairs *u1q1 ... ukqk*. Here *ui* is a knot with a multiplicity @f$ q_{i} \geq 1 \; (1 \leq i \leq k) @f$ so that
+The weight poles are *n* 3D points *B1 ... Bn* if the flag *r* is 0. The weight poles are *n* pairs *B1h1 ... Bnhn* if the flag *r* is 1. Here *Bi* is a 3D point and *hi* is a positive real $(1 \leq i \leq n)$. $h_{i}=1\; (1 \leq i \leq n)$ if the flag *r* is 0.
-@f[ u_{i} < u_{i+1} (1 \leq i \leq k-1),@f]
-@f[ q_{1} \leq m+1,\; q_{k} \leq m+1,\; q_{i} \leq m\; (2 \leq i \leq k-1), \sum_{i=1}^{k}q_{i}=m+n+1. @f]
+The multiplicity knots are *k* pairs *u1q1 ... ukqk*. Here *ui* is a knot with a multiplicity $q_{i} \geq 1 \; (1 \leq i \leq k)$ so that
-The B-spline curve is defined by the following parametric equation:
-
-@f[ C(u) = \frac{\sum_{i=1}^{n}B_{i} \cdot h_{i} \cdot N_{i,m+1}(u)}{\sum_{i=1}^{n}h_{i} \cdot N_{i,m+1}(u)},\;u \in [u_{1},\; u_{k}] @f]
-
-where functions @f$ N_{i,j} @f$ have the following recursion definition by *j*:
+$$
+u_{i} < u_{i+1} (1 \leq i \leq k-1)
+$$
+
+$$
+q_{1} \leq m+1, q_{k} \leq m+1, q_{i} \leq m\; (2 \leq i \leq k-1), \sum_{i=1}^{k}q_{i}=m+n+1
+$$
-@f[ N_{i,1}(u)=\left\{\begin{matrix}
-1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
-0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
-N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m+1) @f]
+The B-spline curve is defined by the following parametric equation:
+
+$$
+C(u) = \frac{\sum_{i=1}^{n} B_{i} \cdot h_{i} \cdot N_{i,m+1}(u)}{\sum_{i=1}^{n} h_{i} \cdot N_{i,m+1}(u)}, u \in [u_{1}, u_{k}]
+$$
+where functions $N_{i,j}$ have the following recursion definition by *j*:
+
+$$
+N_{i,1}(u) =
+\begin{cases}
+1 & \text {if } \bar u_i \leq u \leq \bar u_{i+1} \newline
+0 & \text {if } u < \bar u_{i} \text { or } u \geq \bar u_{i+1}
+\end{cases},
+N_{i,j}(u) = \frac {(u - \bar u_{i}) \cdot N_{i,j-1}(u)}{\bar u_{i+j-1} - \bar u_{i}} + \frac {(\bar u_{i+j} - u) \cdot N_{i+1,j-1}(u)}{\bar u_{i+j} - \bar u_{i+1}},
+(2 \leq j \leq m+1)
+$$
+
where
-
-@f[ \bar{u}_{i} = u_{j},\; (1 \leq j \leq k,\; \sum_{l=1}^{j-1}q_{l}+1 \leq i \leq \sum_{l=1}^{j}q_{l} ). @f]
-
-The example record is interpreted as a B-spline curve with a rational flag *r*=1, a degree *m*=1, pole count *n*=3, multiplicity knot count *k*=5, weight poles *B1*=(0,1,0), *h1*=4, *B2*=(1,-2,0), *h2*=5 and *B3*=(2,3,0), *h3*=6, multiplicity knots *u1*=0, *q1*=1, *u2*=0.25, *q2*=1, *u3*=0.5, *q3*=1, *u4*=0.75, *q4*=1 and *u5*=1, *q5*=1. The B-spline curve is defined by the following parametric equation:
-
-@f[ C(u)=\frac{(0,1,0) \cdot 4 \cdot N_{1,2}(u) + (1,-2,0) \cdot 5 \cdot N_{2,2}(u)+(2,3,0) \cdot 6 \cdot N_{3,2}(u)}{4 \cdot N_{1,2}(u)+5 \cdot N_{2,2}(u)+6 \cdot N_{3,2}(u)}. @f]
-
-
-@subsubsection specification__brep_format_5_1_8 Trimmed Curve - \<3D curve record 8\>
+
+$$
+\bar u_i = u_j, (1 \leq j \leq k, \sum_{l=1}^{j-1} q_l + 1 \leq i \leq \sum_{l=1}^{j} q_l)
+$$
+
+The example record is interpreted as a B-spline curve with a rational flag *r*=1, a degree *m*=1, pole count *n*=3, multiplicity knot count *k*=5, weight poles *B1*=(0,1,0), *h1*=4, *B2*=(1,-2,0), *h2*=5 and *B3*=(2,3,0), *h3*=6, multiplicity knots *u1*=0, *q1*=1, *u2*=0.25, *q2*=1, *u3*=0.5, *q3*=1, *u4*=0.75, *q4*=1 and *u5*=1, *q5*=1. The B-spline curve is defined by the following parametric equation:
+
+$$
+C(u)=\frac{(0,1,0) \cdot 4 \cdot N_{1,2}(u) + (1,-2,0) \cdot 5 \cdot N_{2,2}(u)+(2,3,0) \cdot 6 \cdot N_{3,2}(u)}{4 \cdot N_{1,2}(u)+5 \cdot N_{2,2}(u)+6 \cdot N_{3,2}(u)}
+$$
+
+
+
**Example**
-@verbatim
+```
8 -4 5
1 1 2 3 1 0 0
-@endverbatim
+```
-**BNF-like Definition**
+**BNF-like Definition**
~~~~{.cpp}
<3D curve record 8> = "8" <_> <3D trimmed curve u min> <_> <3D trimmed curve u max> <_\n> <3D curve record>;
@@ -502,26 +575,27 @@ The example record is interpreted as a B-spline curve with a rational flag *r*=
**Description**
-\<3D curve record 8\> describes a trimmed curve. The trimmed curve data consist of reals *umin* and *umax* and \<3D curve record\> so that *umin* < *umax*. The trimmed curve is a restriction of the base curve *B* described in the record to the segment @f$ [u_{min},\;u_{max}]\subseteq domain(B) @f$. The trimmed curve is defined by the following parametric equation:
+\<3D curve record 8\> describes a trimmed curve. The trimmed curve data consist of reals *umin* and *umax* and \<3D curve record\> so that *umin* < *umax*. The trimmed curve is a restriction of the base curve *B* described in the record to the segment $[u_{min},u_{max}]\subseteq domain(B)$. The trimmed curve is defined by the following parametric equation:
-@f[ C(u)=B(u),\; u \in [u_{min},\;u_{max}]. @f]
+$$ C(u)=B(u), u \in [u_{min},u_{max}] $$
-The example record is interpreted as a trimmed curve with *umin*=-4 and *umax*=5 for the base curve @f$ B(u)=(1,2,3)+u \cdot (1,0,0) @f$. The trimmed curve is defined by the following parametric equation: @f$ C(u)=(1,2,3)+u \cdot (1,0,0),\; u \in [-4,\; 5] @f$.
+The example record is interpreted as a trimmed curve with *umin*=-4 and *umax*=5 for the base curve $B(u)=(1,2,3)+u \cdot (1,0,0)$. The trimmed curve is defined by the following parametric equation: $C(u)=(1,2,3)+u \cdot (1,0,0), u \in [-4, 5]$.
-@subsubsection specification__brep_format_5_1_9 Offset Curve - \<3D curve record 9\>
+
+
**Example**
-@verbatim
+```
9 2
0 1 0
1 1 2 3 1 0 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<3D curve record 9> = "9" <_> <3D offset curve distance> <_\n>;
<3D offset curve direction> <_\n>;
<3D curve record>;
@@ -529,21 +603,22 @@ The example record is interpreted as a trimmed curve with *umin*=-4
<3D offset curve distance> = ;
<3D offset curve direction> = <3D direction>;
-@endverbatim
+```
**Description**
-\<3D curve record 9\> describes an offset curve. The offset curve data consist of a distance *d*, a 3D direction *D* and a \<3D curve record\>. The offset curve is the result of offsetting the base curve *B* described in the record to the distance *d* along the vector @f$ [B'(u),\; D] \neq \vec{0} @f$. The offset curve is defined by the following parametric equation:
+\<3D curve record 9\> describes an offset curve. The offset curve data consist of a distance *d*, a 3D direction *D* and a \<3D curve record\>. The offset curve is the result of offsetting the base curve *B* described in the record to the distance *d* along the vector $[B'(u), D] \neq \vec{0}$. The offset curve is defined by the following parametric equation:
-@f[ C(u)=B(u)+d \cdot \frac{[B'(u),\; D]}{|[B'(u),\; D]|},\; u \in domain(B) . @f]
+$$ C(u)=B(u)+d \cdot \frac{[B'(u), D]}{|[B'(u), D]|}, u \in domain(B) . $$
-The example record is interpreted as an offset curve with a distance *d*=2, direction *D*=(0, 1, 0), base curve @f$ B(u)=(1,2,3)+u \cdot (1,0,0) @f$ and defined by the following parametric equation: @f$ C(u)=(1,2,3)+u \cdot (1,0,0)+2 \cdot (0,0,1) @f$.
+The example record is interpreted as an offset curve with a distance *d*=2, direction *D*=(0, 1, 0), base curve $B(u)=(1,2,3)+u \cdot (1,0,0)$ and defined by the following parametric equation: $C(u)=(1,2,3)+u \cdot (1,0,0)+2 \cdot (0,0,1)$.
-@subsection specification__brep_format_5_2 Surfaces
+
+
**Example**
-@verbatim
+```
Surfaces 6
1 0 0 0 1 0 -0 0 0 1 0 -1 0
1 0 0 0 -0 1 0 0 0 1 1 0 -0
@@ -551,11 +626,11 @@ The example record is interpreted as an offset curve with a distance *d*=2, dire
1 0 2 0 -0 1 0 0 0 1 1 0 -0
1 0 0 0 0 0 1 1 0 -0 -0 1 0
1 1 0 0 1 0 -0 0 0 1 0 -1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= <_\n> ;
= “Surfaces” <_> ;
@@ -574,193 +649,203 @@ The example record is interpreted as an offset curve with a distance *d*=2, dire
|
|
;
-@endverbatim
+```
-@subsubsection specification__brep_format_5_2_1 Plane - \< surface record 1 \>
+
**Example**
-@verbatim
+```
1 0 0 3 0 0 1 1 0 -0 -0 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "1" <_> <3D point> (<_> <3D direction>) ^ 3 <_\n>;
-@endverbatim
+```
**Description**
-\ describes a plane. The plane data consist of a 3D point *P* and pairwise orthogonal 3D directions *N*, *Du* and *Dv*. The plane passes through the point *P*, has the normal *N* and is defined by the following parametric equation:
+\ describes a plane. The plane data consist of a 3D point *P* and pairwise orthogonal 3D directions *N*, *Du* and *Dv*. The plane passes through the point *P*, has the normal *N* and is defined by the following parametric equation:
-@f[ S(u,v)=P+u \cdot D_{u}+v \cdot D_{v},\; (u,\;v) \in (-\infty,\; \infty) \times (-\infty,\; \infty). @f]
+$$ S(u,v)=P+u \cdot D_{u}+v \cdot D_{v}, (u,v) \in (-\infty, \infty) \times (-\infty, \infty). $$
-The example record is interpreted as a plane which passes through a point *P*=(0, 0, 3), has a normal *N*=(0, 0, 1) and is defined by the following parametric equation: @f$ S(u,v)=(0,0,3)+u \cdot (1,0,0) + v \cdot (0,1,0) @f$.
+The example record is interpreted as a plane which passes through a point *P*=(0, 0, 3), has a normal *N*=(0, 0, 1) and is defined by the following parametric equation: $S(u,v)=(0,0,3)+u \cdot (1,0,0) + v \cdot (0,1,0)$.
-@subsubsection specification__brep_format_5_2_2 Cylinder - \< surface record 2 \>
+
+
**Example**
-@verbatim
+```
2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "2" <_> <3D point> (<_> <3D direction>) ^ 3 <_> <_\n>;
-@endverbatim
+```
**Description**
-\ describes a cylinder. The cylinder data consist of a 3D point *P*, pairwise orthogonal 3D directions *Dv*, *DX* and *DY* and a non-negative real *r*. The cylinder axis passes through the point *P* and has the direction *Dv*. The cylinder has the radius *r* and is defined by the following parametric equation:
+\ describes a cylinder. The cylinder data consist of a 3D point *P*, pairwise orthogonal 3D directions *Dv*, *DX* and *DY* and a non-negative real *r*. The cylinder axis passes through the point *P* and has the direction *Dv*. The cylinder has the radius *r* and is defined by the following parametric equation:
-@f[ S(u,v)=P+r \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} )+v \cdot D_{v},\; (u,v) \in [0,\; 2 \cdot \pi) \times (-\infty,\; \infty) . @f]
+$$S(u,v)=P+r \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} )+v \cdot D_{v}, (u,v) \in [0, 2 \cdot \pi) \times (-\infty, \infty).$$
-The example record is interpreted as a cylinder which axis passes through a point *P*=(1, 2, 3) and has a direction *Dv*=(0, 0, 1). Directions for the cylinder are *DX*=(1,0,0) and *DY*=(0,1,0). The cylinder has a radius *r*=4 and is defined by the following parametric equation: @f$ S(u,v)=(1,2,3)+4 \cdot ( cos(u) \cdot D_{X} + sin(u) \cdot D_{Y} ) + v \cdot D_{v}. @f$
+The example record is interpreted as a cylinder which axis passes through a point *P*=(1, 2, 3) and has a direction *Dv*=(0, 0, 1). Directions for the cylinder are *DX*=(1,0,0) and *DY*=(0,1,0). The cylinder has a radius *r*=4 and is defined by the following parametric equation: $S(u,v)=(1,2,3)+4 \cdot ( cos(u) \cdot D_{X} + sin(u) \cdot D_{Y} ) + v \cdot D_{v}.$
-@subsubsection specification__brep_format_5_2_3 Cone - \< surface record 3 \>
+
+
**Example**
-@verbatim
+```
3 1 2 3 0 0 1 1 0 -0 -0 1 0 4
0.75
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "3" <_> <3D point> (<_> <3D direction>) ^ 3 (<_> ) ^ 2 <_\n>;
-@endverbatim
+```
**Description**
-\ describes a cone. The cone data consist of a 3D point *P*, pairwise orthogonal 3D directions *DZ*, *DX* and *DY*, a non-negative real *r* and a real @f$ \varphi \in (-\pi /2,\; \pi/2)/\left \{ 0 \right \} @f$. The cone axis passes through the point *P* and has the direction *DZ*. The plane which passes through the point *P* and is parallel to directions *DX* and *DY* is the cone referenced plane. The cone section by the plane is a circle with the radius *r*. The direction from the point *P* to the cone apex is @f$ -sgn(\varphi) \cdot D_{Z} @f$. The cone has a half-angle @f$| \varphi | @f$ and is defined by the following parametric equation:
+\ describes a cone. The cone data consist of a 3D point *P*, pairwise orthogonal 3D directions *DZ*, *DX* and *DY*, a non-negative real *r* and a real $\varphi \in (-\pi /2, \pi/2)/\lbrace 0 \rbrace$. The cone axis passes through the point *P* and has the direction *DZ*. The plane which passes through the point *P* and is parallel to directions *DX* and *DY* is the cone referenced plane. The cone section by the plane is a circle with the radius *r*. The direction from the point *P* to the cone apex is $-sgn(\varphi) \cdot D_{Z}$. The cone has a half-angle $|\varphi|$ and is defined by the following parametric equation:
-@f[ S(u,v)=P+(r+v \cdot sin(\varphi)) \cdot (cos(u) \cdot D_{X}+sin(u) \cdot D_{Y})+v \cdot cos(\varphi) \cdot D_{Z}, (u,v) \in [0,\; 2 \cdot \pi) \times (-\infty,\; \infty) . @f]
+$$ S(u,v)=P+(r+v \cdot sin(\varphi)) \cdot (cos(u) \cdot D_{X}+sin(u) \cdot D_{Y})+v \cdot cos(\varphi) \cdot D_{Z}, (u,v) \in [0, 2 \cdot \pi) \times (-\infty, \infty) . $$
-The example record is interpreted as a cone with an axis which passes through a point *P*=(1, 2, 3) and has a direction *DZ*=(0, 0, 1). Other cone data are *DX*=(1, 0, 0), *DY*=(0, 1, 0), *r*=4 and @f$ \varphi = 0.75 @f$. The cone is defined by the following parametric equation:
-@f[ S(u,v)=(1,2,3)+( 4 + v \cdot sin(0.75)) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + v \cdot cos(0.75) \cdot (0,0,1) . @f]
+The example record is interpreted as a cone with an axis which passes through a point *P*=(1, 2, 3) and has a direction *DZ*=(0, 0, 1). Other cone data are *DX*=(1, 0, 0), *DY*=(0, 1, 0), *r*=4 and $\varphi = 0.75$. The cone is defined by the following parametric equation:
+
+$$ S(u,v)=(1,2,3)+( 4 + v \cdot sin(0.75)) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + v \cdot cos(0.75) \cdot (0,0,1) . $$
-@subsubsection specification__brep_format_5_2_4 Sphere - \< surface record 4 \>
+
+
**Example**
-@verbatim
+```
4 1 2 3 0 0 1 1 0 -0 -0 1 0 4
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "4" <_> <3D point> (<_> <3D direction>) ^ 3 <_> <_\n>;
-@endverbatim
+```
**Description**
-\ describes a sphere. The sphere data consist of a 3D point *P*, pairwise orthogonal 3D directions *DZ*, *DX* and *DY* and a non-negative real *r*. The sphere has the center *P*, radius *r* and is defined by the following parametric equation:
+\ describes a sphere. The sphere data consist of a 3D point *P*, pairwise orthogonal 3D directions *DZ*, *DX* and *DY* and a non-negative real *r*. The sphere has the center *P*, radius *r* and is defined by the following parametric equation:
-@f[ S(u,v)=P+r \cdot cos(v) \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} ) +r \cdot sin(v) \cdot D_{Z},\; (u,v) \in [0,\;2 \cdot \pi) \times [-\pi /2,\; \pi /2] . @f]
+$$ S(u,v)=P+r \cdot cos(v) \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} ) +r \cdot sin(v) \cdot D_{Z}, (u,v) \in [0,2 \cdot \pi) \times [-\pi /2, \pi /2] . $$
-The example record is interpreted as a sphere with its center *P*=(1, 2, 3). Directions for the sphere are *DZ*=(0, 0, 1), *DX*=(1, 0, 0) and *DY*=(0, 1, 0). The sphere has a radius *r*=4 and is defined by the following parametric equation:
-@f[ S(u,v)=(1,2,3)+ 4 \cdot cos(v) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + 4 \cdot sin(v) \cdot (0,0,1) . @f]
+The example record is interpreted as a sphere with its center *P*=(1, 2, 3). Directions for the sphere are *DZ*=(0, 0, 1), *DX*=(1, 0, 0) and *DY*=(0, 1, 0). The sphere has a radius *r*=4 and is defined by the following parametric equation:
+
+$$ S(u,v)=(1,2,3)+ 4 \cdot cos(v) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + 4 \cdot sin(v) \cdot (0,0,1) . $$
-@subsubsection specification__brep_format_5_2_5 Torus - \< surface record 5 \>
+
+
**Example**
-@verbatim
+```
5 1 2 3 0 0 1 1 0 -0 -0 1 0 8 4
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "5" <_> <3D point> (<_> <3D direction>) ^ 3 (<_> ) ^ 2 <_\n>;
-@endverbatim
+```
**Description**
-\ describes a torus. The torus data consist of a 3D point *P*, pairwise orthogonal 3D directions *DZ*, *DX* and *DY* and non-negative reals *r1* and *r2*. The torus axis passes through the point *P* and has the direction *DZ*. *r1* is the distance from the torus circle center to the axis. The torus circle has the radius *r2*. The torus is defined by the following parametric equation:
+\ describes a torus. The torus data consist of a 3D point *P*, pairwise orthogonal 3D directions *DZ*, *DX* and *DY* and non-negative reals *r1* and *r2*. The torus axis passes through the point *P* and has the direction *DZ*. *r1* is the distance from the torus circle center to the axis. The torus circle has the radius *r2*. The torus is defined by the following parametric equation:
-@f[ S(u,v)=P+(r_{1}+r_{2} \cdot cos(v)) \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} ) +r_{2} \cdot sin(v) \cdot D_{Z},\; (u,v) \in [0,\;2 \cdot \pi) \times [0,\; 2 \cdot \pi) . @f]
+$$ S(u,v)=P+(r_{1}+r_{2} \cdot cos(v)) \cdot (cos(u) \cdot D_{x}+sin(u) \cdot D_{y} ) +r_{2} \cdot sin(v) \cdot D_{Z}, (u,v) \in [0,2 \cdot \pi) \times [0, 2 \cdot \pi) . $$
-The example record is interpreted as a torus with an axis which passes through a point *P*=(1, 2, 3) and has a direction *DZ*=(0, 0, 1). *DX*=(1, 0, 0), *DY*=(0, 1, 0), *r1*=8 and *r2*=4 for the torus. The torus is defined by the following parametric equation:
-@f[ S(u,v)=(1,2,3)+ (8+4 \cdot cos(v)) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + 4 \cdot sin(v) \cdot (0,0,1) . @f]
+The example record is interpreted as a torus with an axis which passes through a point *P*=(1, 2, 3) and has a direction *DZ*=(0, 0, 1). *DX*=(1, 0, 0), *DY*=(0, 1, 0), *r1*=8 and *r2*=4 for the torus. The torus is defined by the following parametric equation:
+
+$$ S(u,v)=(1,2,3)+ (8+4 \cdot cos(v)) \cdot ( cos(u) \cdot (1,0,0) + sin(u) \cdot (0,1,0) ) + 4 \cdot sin(v) \cdot (0,0,1) . $$
-@subsubsection specification__brep_format_5_2_6 Linear Extrusion - \< surface record 6 \>
+
+
**Example**
-@verbatim
+```
6 0 0.6 0.8
2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "6" <_> <3D direction> <_\n> <3D curve record>;
-@endverbatim
+```
**Description**
-\ describes a linear extrusion surface. The surface data consist of a 3D direction *Dv* and a \<3D curve record\>. The linear extrusion surface has the direction *Dv*, the base curve *C* described in the record and is defined by the following parametric equation:
+\ describes a linear extrusion surface. The surface data consist of a 3D direction *Dv* and a \<3D curve record\>. The linear extrusion surface has the direction *Dv*, the base curve *C* described in the record and is defined by the following parametric equation:
-@f[ S(u,v)=C(u)+v \cdot D_{v},\; (u,v) \in domain(C) \times (-\infty,\; \infty) . @f]
+$$ S(u,v)=C(u)+v \cdot D_{v}, (u,v) \in domain(C) \times (-\infty, \infty) . $$
The example record is interpreted as a linear extrusion surface with a direction *Dv*=(0, 0.6, 0.8). The base curve is a circle for the surface. The surface is defined by the following parametric equation:
-@f[ S(u,v)=(1,2,3)+4 \cdot (cos(u) \cdot (1,0,0)+sin(u) \cdot (0,1,0))+v \cdot (0, 0.6, 0.8),\; (u,v) \in [0,\; 2 \cdot \pi) \times (-\infty,\; \infty). @f]
+$$ S(u,v)=(1,2,3)+4 \cdot (cos(u) \cdot (1,0,0)+sin(u) \cdot (0,1,0))+v \cdot (0, 0.6, 0.8), (u,v) \in [0, 2 \cdot \pi) \times (-\infty, \infty). $$
-@subsubsection specification__brep_format_5_2_7 Revolution Surface - \< surface record 7 \>
+
+
**Example**
-@verbatim
+```
7 -4 0 3 0 1 0
2 1 2 3 0 0 1 1 0 -0 -0 1 0 4
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "7" <_> <3D point> <_> <3D direction> <_\n> <3D curve record>;
-@endverbatim
+```
**Description**
-\ describes a revolution surface. The surface data consist of a 3D point *P*, a 3D direction *D* and a \<3D curve record\>. The surface axis passes through the point *P* and has the direction *D*. The base curve *C* described by the record and the axis are coplanar. The surface is defined by the following parametric equation:
+\ describes a revolution surface. The surface data consist of a 3D point *P*, a 3D direction *D* and a \<3D curve record\>. The surface axis passes through the point *P* and has the direction *D*. The base curve *C* described by the record and the axis are coplanar. The surface is defined by the following parametric equation:
-@f[ S(u,v)= P+V_{D}(v)+cos(u) \cdot (V(v)-V_{D}(v))+sin(u) \cdot [D,V(v)],\;(u,v) \in [0,\; 2 \cdot \pi)\times domain(C) @f]
+$$ S(u,v)= P+V_{D}(v)+cos(u) \cdot (V(v)-V_{D}(v))+sin(u) \cdot [D,V(v)],(u,v) \in [0, 2 \cdot \pi)\times domain(C) $$
-where @f$ V(v)=C(v)-P, V_{D}(v)=(D,V(v)) \cdot D @f$.
+where $V(v)=C(v)-P, V_{D}(v)=(D,V(v)) \cdot D$.
-The example record is interpreted as a revolution surface with an axis which passes through a point *P*=(-4, 0, 3) and has a direction *D*=(0, 1, 0). The base curve is a circle for the surface. The surface is defined by the following parametric equation:
+The example record is interpreted as a revolution surface with an axis which passes through a point *P*=(-4, 0, 3) and has a direction *D*=(0, 1, 0). The base curve is a circle for the surface. The surface is defined by the following parametric equation:
-@f[ S(u,v)= (-4,0,3)+V_{D}(v)+cos(u) \cdot (V(v)-V_{D}(v))+sin(u) \cdot [(0,1,0),V(v)],\;(u,v) \in [0,\; 2 \cdot \pi)\times [0,\; 2 \cdot \pi) @f]
+$$ S(u,v)= (-4,0,3)+V_{D}(v)+cos(u) \cdot (V(v)-V_{D}(v))+sin(u) \cdot [(0,1,0),V(v)],(u,v) \in [0, 2 \cdot \pi)\times [0, 2 \cdot \pi) $$
-where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D}(v)=((0,1,0),V(v)) \cdot (0,1,0) @f$.
+where $V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D}(v)=((0,1,0),V(v)) \cdot (0,1,0)$.
-@subsubsection specification__brep_format_5_2_8 Bezier Surface - \< surface record 8 \>
+
+
**Example**
-@verbatim
- 8 1 1 2 1 0 0 1 7 1 0 -4 10
- 0 1 -2 8 1 1 5 11
- 0 2 3 9 1 2 6 12
-@endverbatim
+```
+ 8 1 1 2 1 0 0 1 7 1 0 -4 10
+ 0 1 -2 8 1 1 5 11
+ 0 2 3 9 1 2 6 12
+```
**BNF-like Definition**
@@ -787,35 +872,35 @@ where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D
**Description**
-\ describes a Bezier surface. The surface data consist of a u rational flag *ru*, v rational flag *rv*, u degree @f$ m_{u} \leq 25 @f$, v degree @f$ m_{v} \leq 25 @f$ and weight poles.
+\ describes a Bezier surface. The surface data consist of a u rational flag *ru*, v rational flag *rv*, u degree $m_{u} \leq 25$, v degree $m_{v} \leq 25$ and weight poles.
-The weight poles are @f$ (m_{u}+1) \cdot (m_{v}+1) @f$ 3D points @f$ B_{i,j}\; ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$ if @f$ r_{u}+r_{v}=0 @f$. The weight poles are @f$ (m_{u}+1) \cdot (m_{v}+1) @f$ pairs @f$ B_{i,j}h_{i,j}\; ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$ if @f$ r_{u}+r_{v} \neq 0 @f$. Here @f$ B_{i,j} @f$ is a 3D point and @f$ h_{i,j} @f$ is a positive real @f$ ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$. @f$ h_{i,j}=1\; ((i,j) \in \left \{ 0,...,m_{u} \right \} \times \left \{ 0,...,m_{v} \right \}) @f$ if @f$ r_{u}+r_{v} = 0 @f$.
+The weight poles are $(m_{u}+1) \cdot (m_{v}+1)$ 3D points $B_{i,j}\; ((i,j) \in \lbrace 0,...,m_{u} \rbrace \times \lbrace 0,...,m_{v} \rbrace)$ if $r_{u}+r_{v}=0$. The weight poles are $(m_{u}+1) \cdot (m_{v}+1)$ pairs $B_{i,j}h_{i,j}\; ((i,j) \in \lbrace 0,...,m_{u} \rbrace \times \lbrace 0,...,m_{v} \rbrace)$ if $r_{u}+r_{v} \neq 0$. Here $B_{i,j}$ is a 3D point and $h_{i,j}$ is a positive real $((i,j) \in \lbrace 0,...,m_{u} \rbrace \times \lbrace 0,...,m_{v} \rbrace)$. $h_{i,j}=1\; ((i,j) \in \lbrace 0,...,m_{u} \rbrace \times \lbrace 0,...,m_{v} \rbrace)$ if $r_{u}+r_{v} = 0$.
The Bezier surface is defined by the following parametric equation:
-@f[ S(u,v)=\frac{\sum_{i=0}^{m_{u}} \sum_{j=0}^{m_{v}} B_{i,j} \cdot h_{i,j} \cdot C_{m_{u}}^{i} \cdot u^{i} \cdot (1-u)^{m_{u}-i} \cdot C_{m_{v}}^{j} \cdot v^{j} \cdot (1-v)^{m_{v}-j}}{\sum_{i=0}^{m_{u}} \sum_{j=0}^{m_{v}} h_{i,j} \cdot C_{m_{u}}^{i} \cdot u^{i} \cdot (1-u)^{m_{u}-i} \cdot C_{m_{v}}^{j} \cdot v^{j} \cdot (1-v)^{m_{v}-j}}, (u,v) \in [0,1] \times [0,1] @f]
+$$ S(u,v)=\frac{\sum_{i=0}^{m_{u}} \sum_{j=0}^{m_{v}} B_{i,j} \cdot h_{i,j} \cdot C_{m_{u}}^{i} \cdot u^{i} \cdot (1-u)^{m_{u}-i} \cdot C_{m_{v}}^{j} \cdot v^{j} \cdot (1-v)^{m_{v}-j}}{\sum_{i=0}^{m_{u}} \sum_{j=0}^{m_{v}} h_{i,j} \cdot C_{m_{u}}^{i} \cdot u^{i} \cdot (1-u)^{m_{u}-i} \cdot C_{m_{v}}^{j} \cdot v^{j} \cdot (1-v)^{m_{v}-j}}, (u,v) \in [0,1] \times [0,1] $$
-where @f$ 0^{0} \equiv 1 @f$.
+where $0^{0} \equiv 1$.
-The example record is interpreted as a Bezier surface with a u rational flag *ru*=1, v rational flag *rv*=1, u degree *mu*=2, v degree *mv*=1, weight poles *B0,0*=(0, 0, 1), *h0,0*=7, *B0,1*=(1, 0, -4), *h0,1*=10, *B1,0*=(0, 1, -2), *h1,0*=8, *B1,1*=(1, 1, 5), *h1,1*=11, *B2,0*=(0, 2, 3), *h2,0*=9 and *B2,1*=(1, 2, 6), *h2,1*=12. The surface is defined by the following parametric equation:
+The example record is interpreted as a Bezier surface with a u rational flag *ru*=1, v rational flag *rv*=1, u degree *mu*=2, v degree *mv*=1, weight poles *B0,0*=(0, 0, 1), *h0,0*=7, *B0,1*=(1, 0, -4), *h0,1*=10, *B1,0*=(0, 1, -2), *h1,0*=8, *B1,1*=(1, 1, 5), *h1,1*=11, *B2,0*=(0, 2, 3), *h2,0*=9 and *B2,1*=(1, 2, 6), *h2,1*=12. The surface is defined by the following parametric equation:
-@f[
+$$
\begin{align}
-S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ (0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v) + \\
-(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ (0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div [7 \cdot (1-u)^{2} \cdot (1-v)+ \\
+S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ (0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v) + \newline
+(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ (0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div [7 \cdot (1-u)^{2} \cdot (1-v)+ \newline
10 \cdot (1-u)^{2} \cdot v+ 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+ 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ 9 \cdot u^{2} \cdot (1-v)+12 \cdot u^{2} \cdot v ]
\end{align}
-@f]
-
-
-@subsubsection specification__brep_format_5_2_9 B-spline Surface - \< surface record 9 \>
+$$
+
+
+
**Example**
-@verbatim
- 9 1 1 0 0 1 1 3 2 5 4 0 0 1 7 1 0 -4 10
- 0 1 -2 8 1 1 5 11
- 0 2 3 9 1 2 6 12
+```
+ 9 1 1 0 0 1 1 3 2 5 4 0 0 1 7 1 0 -4 10
+ 0 1 -2 8 1 1 5 11
+ 0 2 3 9 1 2 6 12
0 1
0.25 1
@@ -827,11 +912,11 @@ S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1
0.3 1
0.7 1
1 1
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "9" <_> <_>
<_> "0" <_> "0" <_> <_>
<_> <_>
@@ -872,72 +957,74 @@ S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1
( <_\n>) ^ ;
= <_> ;
-@endverbatim
+```
**Description**
-\ describes a B-spline surface. The surface data consist of a u rational flag *ru*, v rational flag *rv*, u degree @f$ m_{u} \leq 25 @f$, v degree @f$ m_{v} \leq 25 @f$, u pole count @f$ n_{u} \geq 2 @f$, v pole count @f$ n_{v} \geq 2 @f$, u multiplicity knot count *ku*, v multiplicity knot count *kv*, weight poles, u multiplicity knots, v multiplicity knots.
+\ describes a B-spline surface. The surface data consist of a u rational flag *ru*, v rational flag *rv*, u degree $m_{u} \leq 25$, v degree $m_{v} \leq 25$, u pole count $n_{u} \geq 2$, v pole count $n_{v} \geq 2$, u multiplicity knot count *ku*, v multiplicity knot count *kv*, weight poles, u multiplicity knots, v multiplicity knots.
-The weight poles are @f$ n_{u} \cdot n_{v} @f$ 3D points @f$ B_{i,j}\; ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$ if @f$ r_{u}+r_{v}=0 @f$. The weight poles are @f$ n_{u} \cdot n_{v} @f$ pairs @f$ B_{i,j}h_{i,j}\; ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$ if @f$ r_{u}+r_{v} \neq 0 @f$. Here @f$ B_{i,j} @f$ is a 3D point and @f$ h_{i,j} @f$ is a positive real @f$ ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$. @f$ h_{i,j}=1\; ((i,j) \in \left \{ 1,...,n_{u} \right \} \times \left \{ 1,...,n_{v} \right \}) @f$ if @f$ r_{u}+r_{v} = 0 @f$.
+The weight poles are $n_{u} \cdot n_{v}$ 3D points $B_{i,j}\; ((i,j) \in \lbrace 1,...,n_{u} \rbrace \times \lbrace 1,...,n_{v} \rbrace)$ if $r_{u}+r_{v}=0$. The weight poles are $n_{u} \cdot n_{v}$ pairs $B_{i,j}h_{i,j}\; ((i,j) \in \lbrace 1,...,n_{u} \rbrace \times \lbrace 1,...,n_{v} \rbrace)$ if $r_{u}+r_{v} \neq 0$. Here $B_{i,j}$ is a 3D point and $h_{i,j}$ is a positive real $((i,j) \in \lbrace 1,...,n_{u} \rbrace \times \lbrace 1,...,n_{v} \rbrace)$. $h_{i,j}=1\; ((i,j) \in \lbrace 1,...,n_{u} \rbrace \times \lbrace 1,...,n_{v} \rbrace)$ if $r_{u}+r_{v} = 0$.
-The u multiplicity knots are *ku* pairs @f$ u_{1}q_{1} ... u_{k_{u}}q_{k_{u}} @f$. Here @f$ u_{i} @f$ is a knot with multiplicity @f$ q_{i} \geq 1 \;(1\leq i\leq k_{u}) @f$ so that
+The u multiplicity knots are *ku* pairs $u_{1}q_{1} ... u_{k_{u}}q_{k_{u}}$. Here $u_{i}$ is a knot with multiplicity $q_{i} \geq 1 \;(1\leq i\leq k_{u})$ so that
-@f[ u_{i} < u_{i+1} \; (1\leq i\leq k_{u}-1), \\
-q_{1} \leq m_{u}+1,\; q_{k_{u}} \leq m_{u}+1,\; q_{i} \leq m_{u}\; (2\leq i\leq k_{u}-1),\; \sum_{i=1}^{k_{u}}q_{i}=m_{u}+n_{u}+1. @f]
+$$ u_{i} < u_{i+1} \; (1\leq i\leq k_{u}-1), \newline
+q_{1} \leq m_{u}+1, q_{k_{u}} \leq m_{u}+1, q_{i} \leq m_{u}\; (2\leq i\leq k_{u}-1), \sum_{i=1}^{k_{u}}q_{i}=m_{u}+n_{u}+1. $$
-The v multiplicity knots are *kv* pairs @f$ v_{1}t_{1} ... v_{k_{v}}t_{k_{v}} @f$. Here @f$ v_{j} @f$ is a knot with multiplicity @f$ t_{i} \geq 1\;(1\leq i\leq k_{v}) @f$ so that
+The v multiplicity knots are *kv* pairs $v_{1}t_{1} ... v_{k_{v}}t_{k_{v}}$. Here $v_{j}$ is a knot with multiplicity $t_{i} \geq 1\;(1\leq i\leq k_{v})$ so that
-@f[ v_{j} < v_{j+1} \; (1\leq j\leq k_{v}-1), \\
-t_{1} \leq m_{v}+1,\; t_{k_{v}} \leq m_{v}+1,\; t_{j} \leq m_{v}\; (2\leq j\leq k_{v}-1),\; \sum_{j=1}^{k_{v}}t_{j}=m_{v}+n_{v}+1. @f]
+$$ v_{j} < v_{j+1} \; (1\leq j\leq k_{v}-1), \newline
+t_{1} \leq m_{v}+1, t_{k_{v}} \leq m_{v}+1, t_{j} \leq m_{v}\; (2\leq j\leq k_{v}-1), \sum_{j=1}^{k_{v}}t_{j}=m_{v}+n_{v}+1. $$
The B-spline surface is defined by the following parametric equation:
-@f[ S(u,v)=\frac{\sum_{i=1}^{n_{u}} \sum_{j=1}^{n_{v}} B_{i,j} \cdot h_{i,j} \cdot N_{i,m_{u}+1}(u) \cdot M_{j,m_{v}+1}(v)}{\sum_{i=1}^{n_{u}} \sum_{j=1}^{n_{v}} h_{i,j} \cdot N_{i,m_{u}+1}(u) \cdot M_{j,m_{v}+1}(v)}, (u,v) \in [u_{1},u_{k_{u}}] \times [v_{1},v_{k_{v}}] @f]
-
-where functions *Ni,j* and *Mi,j* have the following recursion definition by *j*:
+$$ S(u,v)=\frac{\sum_{i=1}^{n_{u}} \sum_{j=1}^{n_{v}} B_{i,j} \cdot h_{i,j} \cdot N_{i,m_{u}+1}(u) \cdot M_{j,m_{v}+1}(v)}{\sum_{i=1}^{n_{u}} \sum_{j=1}^{n_{v}} h_{i,j} \cdot N_{i,m_{u}+1}(u) \cdot M_{j,m_{v}+1}(v)}, (u,v) \in [u_{1},u_{k_{u}}] \times [v_{1},v_{k_{v}}] $$
-@f[
+where functions *Ni,j* and *Mi,j* have the following recursion definition by *j*:
+
+$$
\begin{align}
-N_{i,1}(u)= \left\{\begin{matrix}
-1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}
-0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\; \\
-N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+
-\frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m_{u}+1), \; \\
-M_{i,1}(v)=\left\{\begin{matrix}
-1\Leftarrow \bar{v}_{i} \leq v \leq \bar{v}_{i+1}\\
-0\Leftarrow v < \bar{v}_{i} \vee \bar{v}_{i+1} \leq v \end{matrix} \right.,\; \\
-M_{i,j}(v)=\frac{(v-\bar{v}_{i}) \cdot M_{i,j-1}(v) }{\bar{v}_{i+j-1}-\bar{v}_{i}}+ \frac{(\bar{v}_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar{v}_{i+j}-\bar{v}_{i+1}},\;(2 \leq j \leq m_{v}+1);
+N_{i,1}(u)= \lbrace\begin{matrix}
+1\Leftarrow \bar u_{i} \leq u \leq \bar u_{i+1}
+0\Leftarrow u < \bar u_{i} \vee \bar u_{i+1} \leq u \end{matrix}, \newline
+N_{i,j}(u)=\frac{(u-\bar u_{i}) \cdot N_{i,j-1}(u) }{\bar u_{i+j-1}-\bar u_{i}}+
+\frac{(\bar u_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar u_{i+j}-\bar u_{i+1}},(2 \leq j \leq m_{u}+1), \newline
+M_{i,1}(v)=\lbrace\begin{matrix}
+1\Leftarrow \bar v_{i} \leq v \leq \bar v_{i+1} \newline
+0\Leftarrow v < \bar v_{i} \vee \bar v_{i+1} \leq v \end{matrix}, \newline
+M_{i,j}(v)=\frac{(v-\bar v_{i}) \cdot M_{i,j-1}(v) }{\bar v_{i+j-1}-\bar v_{i}}+ \frac{(\bar v_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar v_{i+j}-\bar v_{i+1}},(2 \leq j \leq m_{v}+1);
\end{align}
-@f]
+$$
+
+where
-where
-@f[ \bar{u}_{i}=u_{j}\; (1 \leq j \leq k_{u},\; \sum_{l=1}^{j-1}q_{l} \leq i \leq \sum_{l=1}^{j}q_{l}), \\
- \bar{v}_{i}=v_{j}\; (1 \leq j \leq k_{v},\; \sum_{l=1}^{j-1}t_{l} \leq i \leq \sum_{l=1}^{j}t_{l}); @f]
+$$ \bar u_{i}=u_{j}\; (1 \leq j \leq k_{u}, \sum_{l=1}^{j-1}q_{l} \leq i \leq \sum_{l=1}^{j}q_{l}), \newline
+ \bar v_{i}=v_{j}\; (1 \leq j \leq k_{v}, \sum_{l=1}^{j-1}t_{l} \leq i \leq \sum_{l=1}^{j}t_{l}); $$
-The example record is interpreted as a B-spline surface with a u rational flag *ru*=1, v rational flag *rv*=1, u degree *mu*=1, v degree *mv*=1, u pole count *nu*=3, v pole count *nv*=2, u multiplicity knot count *ku*=5, v multiplicity knot count *kv*=4, weight poles *B1,1*=(0, 0, 1), *h1,1*=7, *B1,2*=(1, 0, -4), *h1,2*=10, *B2,1*=(0, 1, -2), *h2,1*=8, *B2,2*=(1, 1, 5), *h2,2*=11, *B3,1*=(0, 2, 3), *h3,1*=9 and *B3,2*=(1, 2, 6), *h3,2*=12, u multiplicity knots *u1*=0, *q1*=1, *u2*=0.25, *q2*=1, *u3*=0.5, *q3*=1, *u4*=0.75, *q4*=1 and *u5*=1, *q5*=1, v multiplicity knots *v1*=0, *r1*=1, *v2*=0.3, *r2*=1, *v3*=0.7, *r3*=1 and *v4*=1, *r4*=1. The B-spline surface is defined by the following parametric equation:
+The example record is interpreted as a B-spline surface with a u rational flag *ru*=1, v rational flag *rv*=1, u degree *mu*=1, v degree *mv*=1, u pole count *nu*=3, v pole count *nv*=2, u multiplicity knot count *ku*=5, v multiplicity knot count *kv*=4, weight poles *B1,1*=(0, 0, 1), *h1,1*=7, *B1,2*=(1, 0, -4), *h1,2*=10, *B2,1*=(0, 1, -2), *h2,1*=8, *B2,2*=(1, 1, 5), *h2,2*=11, *B3,1*=(0, 2, 3), *h3,1*=9 and *B3,2*=(1, 2, 6), *h3,2*=12, u multiplicity knots *u1*=0, *q1*=1, *u2*=0.25, *q2*=1, *u3*=0.5, *q3*=1, *u4*=0.75, *q4*=1 and *u5*=1, *q5*=1, v multiplicity knots *v1*=0, *r1*=1, *v2*=0.3, *r2*=1, *v3*=0.7, *r3*=1 and *v4*=1, *r4*=1. The B-spline surface is defined by the following parametric equation:
-@f[
+$$
\begin{align}
-S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
-(0,1,-2) \cdot 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+(1,1,5) \cdot 11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
-(0,2,3) \cdot 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+(1,2,6) \cdot 12 \cdot N_{3,2}(u) \cdot M_{2,2}(v)] \div \\
-[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+ \\
+S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \newline
+(0,1,-2) \cdot 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+(1,1,5) \cdot 11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \newline
+(0,2,3) \cdot 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+(1,2,6) \cdot 12 \cdot N_{3,2}(u) \cdot M_{2,2}(v)] \div \newline
+[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+ \newline
11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+12 \cdot N_{3,2}(u) \cdot M_{2,2}(v) ]
\end{align}
-@f]
-
-@subsubsection specification__brep_format_5_2_10 Rectangular Trim Surface - \< surface record 10 \>
+$$
+
+
+
**Example**
-@verbatim
+```
10 -1 2 -3 4
1 1 2 3 0 0 1 1 0 -0 -0 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "10" <_> <_> <_>
<_> <_\n> ;
@@ -948,51 +1035,61 @@ S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \c
= ;
= ;
-@endverbatim
+```
**Description**
-\ describes a rectangular trim surface. The surface data consist of reals *umin*, *umax*, *vmin* and *vmax* and a \ so that *umin* < *umax* and *vmin* < *vmax*. The rectangular trim surface is a restriction of the base surface *B* described in the record to the set @f$ [u_{min},u_{max}] \times [v_{min},v_{max}] \subseteq domain(B) @f$. The rectangular trim surface is defined by the following parametric equation:
+\ describes a rectangular trim surface. The surface data consist of reals *umin*, *umax*, *vmin* and *vmax* and a \ so that *umin* < *umax* and *vmin* < *vmax*. The rectangular trim surface is a restriction of the base surface *B* described in the record to the set $[u_{min},u_{max}] \times [v_{min},v_{max}] \subseteq domain(B)$. The rectangular trim surface is defined by the following parametric equation:
-@f[ S(u,v)=B(u,v),\; (u,v) \in [u_{min},u_{max}] \times [v_{min},v_{max}] . @f]
+$$ S(u,v)=B(u,v), (u,v) \in [u_{min},u_{max}] \times [v_{min},v_{max}] . $$
-The example record is interpreted as a rectangular trim surface to the set [-1, 2]x[-3, 4] for the base surface @f$ B(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0) @f$. The rectangular trim surface is defined by the following parametric equation: @f$ B(u,v)=(1,2,3)+u \cdot (1,0,0)+ v \cdot (0,1,0),\; (u,v) \in [-1,2] \times [-3,4] @f$.
+The example record is interpreted as a rectangular trim surface to the set [-1, 2]x[-3, 4] for the base surface $B(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0)$. The rectangular trim surface is defined by the following parametric equation: $B(u,v)=(1,2,3)+u \cdot (1,0,0)+ v \cdot (0,1,0), (u,v) \in [-1,2] \times [-3,4]$.
-@subsubsection specification__brep_format_5_2_11 Offset Surface - \< surface record 11 \>
+
+
**Example**
-@verbatim
+```
11 -2
1 1 2 3 0 0 1 1 0 -0 -0 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= "11" <_> <_\n> ;
= ;
-@endverbatim
+```
**Description**
\ describes an offset surface.
-The offset surface data consist of a distance *d* and a \. The offset surface is the result of offsetting the base surface *B* described in the record to the distance *d* along the normal *N* of surface *B*. The offset surface is defined by the following parametric equation:
-
-@f[ S(u,v)=B(u,v)+d \cdot N(u,v),\; (u,v) \in domain(B) . \\
-N(u,v) = [S'_{u}(u,v),S'_{v}(u,v)] @f]
-if @f$ [S'_{u}(u,v),S'_{v}(u,v)] \neq \vec{0} @f$.
-
-The example record is interpreted as an offset surface with a distance *d*=-2 and base surface @f$ B(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0) @f$. The offset surface is defined by the following parametric equation: @f$ S(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0)-2 \cdot (0,0,1) @f$.
+The offset surface data consist of a distance *d* and a \. The offset surface is the result of offsetting the base surface *B* described in the record to the distance *d* along the normal *N* of surface *B*. The offset surface is defined by the following parametric equation:
+
+$$
+S(u,v) = B(u,v) + d \cdot N(u,v), \quad (u,v) \in \text {domain} (B)
+$$
+
+$$
+N(u,v) = [S'_u(u,v), S'_v(u,v)]
+$$
+
+$$
+\text {if} [S'_u(u,v), S'_v(u,v)] \neq \vec{0}
+$$
+
+The example record is interpreted as an offset surface with a distance *d*=-2 and base surface $B(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0)$. The offset surface is defined by the following parametric equation: $S(u,v)=(1,2,3)+u \cdot (1,0,0)+v \cdot (0,1,0)-2 \cdot (0,0,1)$.
-@subsection specification__brep_format_5_3 2D curves
+
+
**Example**
-@verbatim
+```
Curve2ds 24
1 0 0 1 0
1 0 0 1 0
@@ -1018,11 +1115,11 @@ The example record is interpreted as an offset surface with a distance *d*=-2
1 0 2 1 0
1 3 0 0 1
1 0 2 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<2D curves> = <2D curve header> <_\n> <2D curve records>;
<2D curve header> = "Curve2ds" <_> <2D curve count>;
@@ -1041,38 +1138,40 @@ The example record is interpreted as an offset surface with a distance *d*=-2
<2D curve record 7> |
<2D curve record 8> |
<2D curve record 9>;
-@endverbatim
+```
-@subsubsection specification__brep_format_5_3_1 Line - \<2D curve record 1\>
+
+
**Example**
-@verbatim
+```
1 3 0 0 -1
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<2D curve record 1> = "1" <_> <2D point> <_> <2D direction> <_\n>;
-@endverbatim
+```
**Description**
-\<2D curve record 1\> describes a line. The line data consist of a 2D point *P* and a 2D direction *D*. The line passes through the point *P*, has the direction *D* and is defined by the following parametric equation:
+\<2D curve record 1\> describes a line. The line data consist of a 2D point *P* and a 2D direction *D*. The line passes through the point *P*, has the direction *D* and is defined by the following parametric equation:
-@f[ C(u)=P+u \cdot D, \; u \in (-\infty,\; \infty). @f]
+$$ C(u)=P+u \cdot D, u \in (-\infty, \infty). $$
-The example record is interpreted as a line which passes through a point *P*=(3,0), has a direction *D*=(0,-1) and is defined by the following parametric equation: @f$ C(u)=(3,0)+ u \cdot (0,-1) @f$.
+The example record is interpreted as a line which passes through a point *P*=(3,0), has a direction *D*=(0,-1) and is defined by the following parametric equation: $C(u)=(3,0)+ u \cdot (0,-1)$.
-@subsubsection specification__brep_format_5_3_2 Circle - \<2D curve record 2\>
+
+
**Example**
-@verbatim
+```
2 1 2 1 0 -0 1 3
-@endverbatim
+```
**BNF-like Definition**
@@ -1090,24 +1189,25 @@ The example record is interpreted as a line which passes through a point *P*=(3
**Description**
-\<2D curve record 2\> describes a circle. The circle data consist of a 2D point *P*, orthogonal 2D directions *Dx* and *Dy* and a non-negative real *r*. The circle has a center *P*. The circle plane is parallel to directions *Dx* and *Dy*. The circle has a radius *r* and is defined by the following parametric equation:
+\<2D curve record 2\> describes a circle. The circle data consist of a 2D point *P*, orthogonal 2D directions *Dx* and *Dy* and a non-negative real *r*. The circle has a center *P*. The circle plane is parallel to directions *Dx* and *Dy*. The circle has a radius *r* and is defined by the following parametric equation:
-@f[ C(u)=P+r \cdot (cos(u) \cdot D_{x} + sin(u) \cdot D_{y}),\; u \in [0,\; 2 \cdot \pi) . @f]
+$$ C(u)=P+r \cdot (cos(u) \cdot D_{x} + sin(u) \cdot D_{y}), u \in [0, 2 \cdot \pi) . $$
-The example record is interpreted as a circle which has a center *P*=(1,2). The circle plane is parallel to directions *Dx*=(1,0) and *Dy*=(0,1). The circle has a radius *r*=3 and is defined by the following parametric equation: @f$ C(u)=(1,2)+3 \cdot (cos(u) \cdot (1,0) + sin(u) \cdot (0,1)) @f$.
+The example record is interpreted as a circle which has a center *P*=(1,2). The circle plane is parallel to directions *Dx*=(1,0) and *Dy*=(0,1). The circle has a radius *r*=3 and is defined by the following parametric equation: $C(u)=(1,2)+3 \cdot (cos(u) \cdot (1,0) + sin(u) \cdot (0,1))$.
-@subsubsection specification__brep_format_5_3_3 Ellipse - \<2D curve record 3\>
+
+
**Example**
-@verbatim
+```
3 1 2 1 0 -0 1 4 3
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<2D curve record 3> = "3" <_> <2D ellipse center> <_> <2D ellipse Dmaj> <_>
<2D ellipse Dmin> <_> <2D ellipse Rmaj> <_> <2D ellipse Rmin> <_\n>;
@@ -1120,28 +1220,29 @@ The example record is interpreted as a circle which has a center *P*=(1,2). Th
<2D ellipse Rmaj> = ;
<2D ellipse Rmin> = ;
-@endverbatim
+```
**Description**
-\<2D curve record 3\> describes an ellipse. The ellipse data are 2D point *P*, orthogonal 2D directions *Dmaj* and *Dmin* and non-negative reals *rmaj* and *rmin* that *rmaj* @f$ \leq @f$ *rmin*. The ellipse has a center *P*, major and minor axis directions *Dmaj* and *Dmin*, major and minor radii *rmaj* and *rmin* and is defined by the following parametric equation:
+\<2D curve record 3\> describes an ellipse. The ellipse data are 2D point *P*, orthogonal 2D directions *Dmaj* and *Dmin* and non-negative reals *rmaj* and *rmin* that *rmaj* $\leq$ *rmin*. The ellipse has a center *P*, major and minor axis directions *Dmaj* and *Dmin*, major and minor radii *rmaj* and *rmin* and is defined by the following parametric equation:
-@f[ C(u)=P+r_{maj} \cdot cos(u) \cdot D_{maj}+r_{min} \cdot sin(u) \cdot D_{min},\; u \in [0,\; 2 \cdot \pi) . @f]
+$$ C(u)=P+r_{maj} \cdot cos(u) \cdot D_{maj}+r_{min} \cdot sin(u) \cdot D_{min}, u \in [0, 2 \cdot \pi) . $$
-The example record is interpreted as an ellipse which has a center *P*=(1,2), major and minor axis directions *Dmaj*=(1,0) and *Dmin*=(0,1), major and minor radii *rmaj*=4 and *rmin*=3 and is defined by the following parametric equation: @f$ C(u)=(1,2)+4 \cdot cos(u) \cdot (1,0)+3 \cdot sin(u) \cdot (0,1) @f$.
+The example record is interpreted as an ellipse which has a center *P*=(1,2), major and minor axis directions *Dmaj*=(1,0) and *Dmin*=(0,1), major and minor radii *rmaj*=4 and *rmin*=3 and is defined by the following parametric equation: $C(u)=(1,2)+4 \cdot cos(u) \cdot (1,0)+3 \cdot sin(u) \cdot (0,1)$.
-@subsubsection specification__brep_format_5_3_4 Parabola - \<2D curve record 4\>
+
+
**Example**
-@verbatim
+```
4 1 2 1 0 -0 1 16
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<2D curve record 4> = "4" <_> <2D parabola origin> <_> <2D parabola Dx> <_>
<2D parabola Dy> <_> <2D parabola focal length> <_\n>;
@@ -1152,19 +1253,20 @@ The example record is interpreted as an ellipse which has a center *P*=(1,2),
<2D parabola Dy> = <2D direction>;
<2D parabola focal length> = ;
-@endverbatim
+```
**Description**
-\<2D curve record 4\> describes a parabola. The parabola data consist of a 2D point *P*, orthogonal 2D directions *Dx* and *Dy* and a non-negative real *f*. The parabola coordinate system has its origin *P* and axis directions *Dx* and *Dy*. The parabola has a focus length *f* and is defined by the following parametric equation:
+\<2D curve record 4\> describes a parabola. The parabola data consist of a 2D point *P*, orthogonal 2D directions *Dx* and *Dy* and a non-negative real *f*. The parabola coordinate system has its origin *P* and axis directions *Dx* and *Dy*. The parabola has a focus length *f* and is defined by the following parametric equation:
-@f[ C(u)=P+\frac{u^{2}}{4 \cdot f} \cdot D_{x}+u \cdot D_{y},\; u \in (-\infty,\; \infty) \Leftarrow f \neq 0;\\
-C(u)=P+u \cdot D_{x},\; u \in (-\infty,\; \infty) \Leftarrow f = 0\; (degenerated\;case). @f]
+$$ C(u)=P+\frac{u^{2}}{4 \cdot f} \cdot D_{x}+u \cdot D_{y}, u \in (-\infty, \infty) \Leftarrow f \neq 0; \newline
+C(u)=P+u \cdot D_{x}, u \in (-\infty, \infty) \Leftarrow f = 0\; (degenerated\;case). $$
-The example record is interpreted as a parabola in plane which passes through a point *P*=(1,2) and is parallel to directions *Dx*=(1,0) and *Dy*=(0,1). The parabola has a focus length *f*=16 and is defined by the following parametric equation: @f$ C(u)=(1,2)+ \frac{u^{2}}{64} \cdot (1,0)+u \cdot (0,1) @f$.
+The example record is interpreted as a parabola in plane which passes through a point *P*=(1,2) and is parallel to directions *Dx*=(1,0) and *Dy*=(0,1). The parabola has a focus length *f*=16 and is defined by the following parametric equation: $C(u)=(1,2)+ \frac{u^{2}}{64} \cdot (1,0)+u \cdot (0,1)$.
-@subsubsection specification__brep_format_5_3_5 Hyperbola - \<2D curve record 5\>
+
+
**Example**
5 1 2 1 0 -0 1 3 4
@@ -1172,7 +1274,7 @@ The example record is interpreted as a parabola in plane which passes through a
**BNF-like Definition**
-@verbatim
+```
<2D curve record 5> = "5" <_> <2D hyperbola origin> <_> <2D hyperbola Dx> <_>
<2D hyperbola Dy> <_> <2D hyperbola Kx> <_> <2D hyperbola Ky> <_\n>;
@@ -1185,28 +1287,29 @@ The example record is interpreted as a parabola in plane which passes through a
<2D hyperbola Kx> = ;
<2D hyperbola Ky> = ;
-@endverbatim
+```
**Description**
-\<2D curve record 5\> describes a hyperbola. The hyperbola data consist of a 2D point *P*, orthogonal 2D directions *Dx* and *Dy* and non-negative reals *kx* and *ky*. The hyperbola coordinate system has origin *P* and axis directions *Dx* and *Dy*. The hyperbola is defined by the following parametric equation:
+\<2D curve record 5\> describes a hyperbola. The hyperbola data consist of a 2D point *P*, orthogonal 2D directions *Dx* and *Dy* and non-negative reals *kx* and *ky*. The hyperbola coordinate system has origin *P* and axis directions *Dx* and *Dy*. The hyperbola is defined by the following parametric equation:
-@f[ C(u)=P+k_{x} \cdot cosh(u) D_{x}+k_{y} \cdot sinh(u) \cdot D_{y},\; u \in (-\infty,\; \infty). @f]
+$$ C(u)=P+k_{x} \cdot cosh(u) D_{x}+k_{y} \cdot sinh(u) \cdot D_{y}, u \in (-\infty, \infty). $$
-The example record is interpreted as a hyperbola with coordinate system which has origin *P*=(1,2) and axis directions *Dx*=(1,0) and *Dy*=(0,1). Other data for the hyperbola are *kx*=5 and *ky*=4. The hyperbola is defined by the following parametric equation: @f$ C(u)=(1,2)+3 \cdot cosh(u) \cdot (1,0)+4 \cdot sinh(u) \cdot (0,1) @f$.
+The example record is interpreted as a hyperbola with coordinate system which has origin *P*=(1,2) and axis directions *Dx*=(1,0) and *Dy*=(0,1). Other data for the hyperbola are *kx*=5 and *ky*=4. The hyperbola is defined by the following parametric equation: $C(u)=(1,2)+3 \cdot cosh(u) \cdot (1,0)+4 \cdot sinh(u) \cdot (0,1)$.
-@subsubsection specification__brep_format_5_3_6 Bezier Curve - \<2D curve record 6\>
+
+
**Example**
-@verbatim
-6 1 2 0 1 4 1 -2 5 2 3 6
-@endverbatim
+```
+6 1 2 0 1 4 1 -2 5 2 3 6
+```
**BNF-like Definition**
-@verbatim
+```
<2D curve record 6> = "6" <_> <2D Bezier rational flag> <_> <2D Bezier degree>
<2D Bezier weight poles> <_\n>;
@@ -1217,33 +1320,34 @@ The example record is interpreted as a hyperbola with coordinate system which h
<2D Bezier weight poles> = (<_> <2D Bezier weight pole>) ^ (<2D Bezier degree> <+> “1”);
<2D Bezier weight pole> = <2D point> [<_> ];
-@endverbatim
+```
**Description**
-\<2D curve record 6\> describes a Bezier curve. The curve data consist of a rational flag *r*, a degree @f$ m \leq 25 @f$ and weight poles.
+\<2D curve record 6\> describes a Bezier curve. The curve data consist of a rational flag *r*, a degree $m \leq 25$ and weight poles.
-The weight poles are *m*+1 2D points *B0 ... Bm* if the flag *r* is 0. The weight poles are *m*+1 pairs *B0h0 ... Bmhm* if the flag *r* is 1. Here *Bi* is a 2D point and *hi* is a positive real @f$ (0\leq i\leq m) @f$. *hi*=1 @f$(0\leq i\leq m) @f$ if the flag *r* is 0.
+The weight poles are *m*+1 2D points *B0 ... Bm* if the flag *r* is 0. The weight poles are *m*+1 pairs *B0h0 ... Bmhm* if the flag *r* is 1. Here *Bi* is a 2D point and *hi* is a positive real $(0\leq i\leq m)$. *hi*=1 $(0\leq i\leq m)$ if the flag *r* is 0.
The Bezier curve is defined by the following parametric equation:
-@f[ C(u)= \frac{\sum_{i=0}^{m} B_{i} \cdot h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}{\sum_{i=0}^{m} h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}},\; u \in [0,1] @f]
+$$ C(u)= \frac{\sum_{i=0}^{m} B_{i} \cdot h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}{\sum_{i=0}^{m} h_{i} \cdot C_{m}^{i} \cdot u^{i} \cdot (1-u)^{m-i}}, u \in [0,1] $$
-where @f$ 0^{0} \equiv 1 @f$.
+where $0^{0} \equiv 1$.
-The example record is interpreted as a Bezier curve with a rational flag *r*=1, a degree *m*=2 and weight poles *B0*=(0,1), *h0*=4, *B1*=(1,-2), *h1*=5 and *B2*=(2,3), *h2*=6. The Bezier curve is defined by the following parametric equation:
+The example record is interpreted as a Bezier curve with a rational flag *r*=1, a degree *m*=2 and weight poles *B0*=(0,1), *h0*=4, *B1*=(1,-2), *h1*=5 and *B2*=(2,3), *h2*=6. The Bezier curve is defined by the following parametric equation:
-@f[ C(u)= \frac{(0,1) \cdot 4 \cdot (1-u)^{2}+(1,-2) \cdot 5 \cdot 2 \cdot u \cdot (1-u)+(2,3) \cdot 6 \cdot u^{2}}{ 4 \cdot (1-u)^{2}+5 \cdot 2 \cdot u \cdot (1-u)+6 \cdot u^{2}} . @f]
+$$ C(u)= \frac{(0,1) \cdot 4 \cdot (1-u)^{2}+(1,-2) \cdot 5 \cdot 2 \cdot u \cdot (1-u)+(2,3) \cdot 6 \cdot u^{2}}{ 4 \cdot (1-u)^{2}+5 \cdot 2 \cdot u \cdot (1-u)+6 \cdot u^{2}} . $$
-@subsubsection specification__brep_format_5_3_7 B-spline Curve - \<2D curve record 7\>
+
+
**Example**
-@verbatim
-7 1 0 1 3 5 0 1 4 1 -2 5 2 3 6
- 0 1 0.25 1 0.5 1 0.75 1 1 1
-@endverbatim
+```
+7 1 0 1 3 5 0 1 4 1 -2 5 2 3 6
+ 0 1 0.25 1 0.5 1 0.75 1 1 1
+```
**BNF-like Definition**
@@ -1270,104 +1374,107 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
**Description**
-\<2D curve record 7\> describes a B-spline curve. The curve data consist of a rational flag *r*, a degree @f$ m \leq 25 @f$, a pole count @f$ n \geq 2 @f$, a multiplicity knot count *k*, weight poles and multiplicity knots.
+\<2D curve record 7\> describes a B-spline curve. The curve data consist of a rational flag *r*, a degree $m \leq 25$, a pole count $n \geq 2$, a multiplicity knot count *k*, weight poles and multiplicity knots.
-The weight poles are *n* 2D points *B1 ... Bn* if the flag *r* is 0. The weight poles are *n* pairs *B1h1 ... Bnhn* if the flag *r* is 1. Here *Bi* is a 2D point and *hi* is a positive real @f$ (1\leq i\leq n) @f$. *hi*=1 @f$(1\leq i\leq n) @f$ if the flag *r* is 0.
+The weight poles are *n* 2D points *B1 ... Bn* if the flag *r* is 0. The weight poles are *n* pairs *B1h1 ... Bnhn* if the flag *r* is 1. Here *Bi* is a 2D point and *hi* is a positive real $(1\leq i\leq n)$. *hi*=1 $(1\leq i\leq n)$ if the flag *r* is 0.
-The multiplicity knots are *k* pairs *u1q1 ... ukqk*. Here *ui* is a knot with multiplicity @f$ q_{i} \geq 1\; (1 \leq i \leq k) @f$ so that
+The multiplicity knots are *k* pairs *u1q1 ... ukqk*. Here *ui* is a knot with multiplicity $q_{i} \geq 1\; (1 \leq i \leq k)$ so that
-@f[ u_{i} < u_{i+1}\; (1 \leq i \leq k-1), \\
-q_{1} \leq m+1,\; q_{k} \leq m+1,\; q_{i} \leq m\; (2 \leq i \leq k-1),\; \sum_{i=1}^{k}q_{i}=m+n+1 . @f]
+$$ u_{i} < u_{i+1}\; (1 \leq i \leq k-1), \newline
+q_{1} \leq m+1, q_{k} \leq m+1, q_{i} \leq m\; (2 \leq i \leq k-1), \sum_{i=1}^{k}q_{i}=m+n+1 . $$
The B-spline curve is defined by the following parametric equation:
-@f[ C(u)= \frac{\sum_{i=1}^{n} B_{i} \cdot h_{i} \cdot N_{i,m+1}(u) }{\sum_{i=1}^{n} h_{i} \cdot N_{i,m+1}(u)},\; u \in [u_{1},\; u_{k}] @f]
-
-where functions *Ni,j* have the following recursion definition by *j*
+$$ C(u)= \frac{\sum_{i=1}^{n} B_{i} \cdot h_{i} \cdot N_{i,m+1}(u) }{\sum_{i=1}^{n} h_{i} \cdot N_{i,m+1}(u)}, u \in [u_{1}, u_{k}] $$
+
+where functions *Ni,j* have the following recursion definition by *j*
-@f[ N_{i,1}(u)=\left\{\begin{matrix}
-1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
-0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
-N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m+1) @f]
+$$ N_{i,1}(u)=\lbrace\begin{matrix}
+1\Leftarrow \bar u_{i} \leq u \leq \bar u_{i+1} \newline
+0\Leftarrow u < \bar u_{i} \vee \bar u_{i+1} \leq u \end{matrix},
+N_{i,j}(u)=\frac{(u-\bar u_{i}) \cdot N_{i,j-1}(u) }{\bar u_{i+j-1}-\bar u_{i}}+ \frac{(\bar u_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar u_{i+j}-\bar u_{i+1}},(2 \leq j \leq m+1) $$
where
-@f[ \bar{u}_{i}=u_{j}\; (1\leq j\leq k,\; \sum_{l=1}^{j-1}q_{l}+1 \leq i \leq \sum_{l=1}^{j}q_{l}) . @f]
+$$\bar u_{i}=u_{j}\; (1\leq j\leq k, \sum_{l=1}^{j-1}q_{l}+1 \leq i \leq \sum_{l=1}^{j}q_{l})$$
-The example record is interpreted as a B-spline curve with a rational flag *r*=1, a degree *m*=1, a pole count *n*=3, a multiplicity knot count *k*=5, weight poles *B1*=(0,1), *h1*=4, *B2*=(1,-2), *h2*=5 and *B3*=(2,3), *h3*=6 and multiplicity knots *u1*=0, *q1*=1, *u2*=0.25, *q2*=1, *u3*=0.5, *q3*=1, *u4*=0.75, *q4*=1 and *u5*=1, *q5*=1. The B-spline curve is defined by the following parametric equation:
+The example record is interpreted as a B-spline curve with a rational flag *r*=1, a degree *m*=1, a pole count *n*=3, a multiplicity knot count *k*=5, weight poles *B1*=(0,1), *h1*=4, *B2*=(1,-2), *h2*=5 and *B3*=(2,3), *h3*=6 and multiplicity knots *u1*=0, *q1*=1, *u2*=0.25, *q2*=1, *u3*=0.5, *q3*=1, *u4*=0.75, *q4*=1 and *u5*=1, *q5*=1. The B-spline curve is defined by the following parametric equation:
-@f[ C(u)= \frac{(0,1) \cdot 4 \cdot N_{1,2}(u)+(1,-2) \cdot 5 \cdot N_{2,2}(u)+(2,3) \cdot 6 \cdot N_{3,2}(u)}{ 4 \cdot N_{1,2}(u)+5 \cdot N_{2,2}(u)+6 \cdot N_{3,2}(u)} . @f]
+$$ C(u)= \frac{(0,1) \cdot 4 \cdot N_{1,2}(u)+(1,-2) \cdot 5 \cdot N_{2,2}(u)+(2,3) \cdot 6 \cdot N_{3,2}(u)}{ 4 \cdot N_{1,2}(u)+5 \cdot N_{2,2}(u)+6 \cdot N_{3,2}(u)} . $$
-@subsubsection specification__brep_format_5_3_8 Trimmed Curve - \<2D curve record 8\>
+
+
**Example**
-@verbatim
+```
8 -4 5
1 1 2 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<2D curve record 8> = "8" <_> <2D trimmed curve u min> <_> <2D trimmed curve u max> <_\n>
<2D curve record>;
<2D trimmed curve u min> = ;
<2D trimmed curve u max> = ;
-@endverbatim
+```
**Description**
-\<2D curve record 8\> describes a trimmed curve. The trimmed curve data consist of reals *umin* and *umax* and a \<2D curve record\> so that *umin* < *umax*. The trimmed curve is a restriction of the base curve *B* described in the record to the segment @f$ [u_{min},\;u_{max}]\subseteq domain(B) @f$. The trimmed curve is defined by the following parametric equation:
+\<2D curve record 8\> describes a trimmed curve. The trimmed curve data consist of reals *umin* and *umax* and a \<2D curve record\> so that *umin* < *umax*. The trimmed curve is a restriction of the base curve *B* described in the record to the segment $[u_{min},u_{max}]\subseteq domain(B)$. The trimmed curve is defined by the following parametric equation:
-@f[ C(u)=B(u),\; u \in [u_{min},\;u_{max}] . @f]
+$$ C(u)=B(u), u \in [u_{min},u_{max}] . $$
-The example record is interpreted as a trimmed curve with *umin*=-4, *umax*=5 and base curve @f$ B(u)=(1,2)+u \cdot (1,0) @f$. The trimmed curve is defined by the following parametric equation: @f$ C(u)=(1,2)+u \cdot (1,0),\; u \in [-4,5] @f$.
+The example record is interpreted as a trimmed curve with *umin*=-4, *umax*=5 and base curve $B(u)=(1,2)+u \cdot (1,0)$. The trimmed curve is defined by the following parametric equation: $C(u)=(1,2)+u \cdot (1,0), u \in [-4,5]$.
-@subsubsection specification__brep_format_5_3_9 Offset Curve - \<2D curve record 9\>
+
+
**Example**
-@verbatim
+```
9 2
1 1 2 1 0
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<2D curve record 9> = "9" <_> <2D offset curve distance> <_\n> <2D curve record>;
<2D offset curve distance> = ;
-@endverbatim
+```
**Description**
-\<2D curve record 9\> describes an offset curve. The offset curve data consist of a distance *d* and a \<2D curve record\>. The offset curve is the result of offsetting the base curve *B* described in the record to the distance *d* along the vector @f$ (B'_{Y}(u),\; -B'_{X}(u)) \neq \vec{0} @f$ where @f$ B(u)=(B'_{X}(u),\; B'_{Y}(u)) @f$. The offset curve is defined by the following parametric equation:
-
-@f[ C(u)=B(u)+d \cdot (B'_{Y}(u),\; -B'_{X}(u)),\; u \in domain(B) . @f]
+\<2D curve record 9\> describes an offset curve. The offset curve data consist of a distance *d* and a \<2D curve record\>. The offset curve is the result of offsetting the base curve *B* described in the record to the distance *d* along the vector $(B'_Y(u), -B'_X(u)) \neq \vec{0}$ where $B(u)=(B'_X(u), B'_Y(u))$. The offset curve is defined by the following parametric equation:
+
+$$C(u)=B(u)+d \cdot (B'_Y(u), -B'_X(u)), u \in domain(B)$$
-The example record is interpreted as an offset curve with a distance *d*=2 and base curve @f$ B(u)=(1,2)+u \cdot (1,0) @f$ and is defined by the following parametric equation: @f$ C(u)=(1,2)+u \cdot (1,0)+2 \cdot (0,-1) @f$.
+The example record is interpreted as an offset curve with a distance *d*=2 and base curve $B(u)=(1,2)+u \cdot (1,0)$ and is defined by the following parametric equation: $C(u)=(1,2)+u \cdot (1,0)+2 \cdot (0,-1)$.
-@subsection specification__brep_format_5_4 3D polygons
+
+
**Example**
-@verbatim
+```
Polygon3D 1
2 1
0.1
1 0 0 2 0 0
0 1
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
<3D polygons> = <3D polygon header> <_\n> <3D polygon records>;
<3D polygon header> = "Polygon3D" <_> <3D polygon record count>;
@@ -1393,26 +1500,27 @@ The example record is interpreted as an offset curve with a distance *d*=2 and
<3D polygon u parameters> = (<3D polygon u parameter> <_>) ^ <3D polygon node count>;
<3D polygon u parameter> = ;
-@endverbatim
+```
**Description**
-\<3D polygons\> record describes a 3D polyline *L* which approximates a 3D curve *C*. The polyline data consist of a node count @f$ m \geq 2 @f$, a parameter presence flag *p*, a deflection @f$ d \geq 0 @f$, nodes @f$ N_{i}\; (1\leq i \leq m) @f$ and parameters @f$ u_{i}\; (1\leq i \leq m) @f$. The parameters are present only if *p*=1. The polyline *L* passes through the nodes. The deflection *d* describes the deflection of polyline *L* from the curve *C*:
+\<3D polygons\> record describes a 3D polyline *L* which approximates a 3D curve *C*. The polyline data consist of a node count $m \geq 2$, a parameter presence flag *p*, a deflection $\geq 0$, nodes $N_{i}\; (1\leq i \leq m)$ and parameters $u_{i}\; (1\leq i \leq m)$. The parameters are present only if *p*=1. The polyline *L* passes through the nodes. The deflection *d* describes the deflection of polyline *L* from the curve *C*:
-@f[ \underset{P \in C}{max}\; \underset{Q \in L}{min}|Q-P| \leq d . @f]
+$$ \underset{P \in C}{max}\; \underset{Q \in L}{min}|Q-P| \leq d . $$
-The parameter @f$ u_{i}\; (1\leq i \leq m) @f$ is the parameter of the node *Ni* on the curve *C*:
+The parameter $u_{i}\; (1\leq i \leq m)$ is the parameter of the node *Ni* on the curve *C*:
-@f[ C(u_{i})=N_{i} . @f]
+$$ C(u_{i})=N_{i} . $$
-The example record describes a polyline from *m*=2 nodes with a parameter presence flag *p*=1, a deflection *d*=0.1, nodes *N1*=(1,0,0) and *N2*=(2,0,0) and parameters *u1*=0 and *u2*=1.
+The example record describes a polyline from *m*=2 nodes with a parameter presence flag *p*=1, a deflection *d*=0.1, nodes *N1*=(1,0,0) and *N2*=(2,0,0) and parameters *u1*=0 and *u2*=1.
-@subsection specification__brep_format_6_4 Triangulations
+
+
**Example**
-@verbatim
+```
Triangulations 6
4 2 1 0
0 0 0 0 0 3 0 2 3 0 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
@@ -1426,7 +1534,7 @@ The example record describes a polyline from *m*=2 nodes with a parameter prese
0 0 0 0 2 0 1 2 0 1 0 0 0 0 0 2 1 2 1 0 3 2 1 3 1 4
4 2 1 0
1 0 0 1 0 3 1 2 3 1 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
-@endverbatim
+```
**BNF-like Definition**
@@ -1473,31 +1581,32 @@ The example record describes a polyline from *m*=2 nodes with a parameter prese
\ are used in version 2 or later.
\ and \ are used in version 3.
-\ describes a triangulation *T* which approximates a surface *S*. The triangulation data consist of a node count @f$ m \geq 3 @f$, a triangle count @f$ k \geq 1 @f$, a parameter presence flag *p*, a deflection @f$ d \geq 0 @f$, nodes @f$ N_{i}\; (1\leq i \leq m) @f$, parameter pairs @f$ u_{i}\; v_{i}\; (1\leq i \leq m) @f$, triangles @f$ n_{j,1}\; n_{j,2}\; n_{j,3}\; (1\leq j \leq k,\; n_{j,l} \in \left \{1,...,m \right \}\; (1\leq l\leq 3)) @f$. The parameters are present only if *p*=1. The deflection describes the triangulation deflection from the surface:
+\ describes a triangulation *T* which approximates a surface *S*. The triangulation data consist of a node count $m \geq 3$, a triangle count $k \geq 1$, a parameter presence flag *p*, a deflection $d \geq 0$, nodes $N_{i}\; (1\leq i \leq m)$, parameter pairs $u_{i}\; v_{i}\; (1\leq i \leq m)$, triangles $n_{j,1}\; n_{j,2}\; n_{j,3}\; (1\leq j \leq k, n_{j,l} \in \lbrace1,...,m \rbrace\; (1\leq l\leq 3))$. The parameters are present only if *p*=1. The deflection describes the triangulation deflection from the surface:
-@f[ \underset{P \in S}{max}\; \underset{Q \in T}{min}|Q-P| \leq d . @f]
+$$ \underset{P \in S}{max}\; \underset{Q \in T}{min}|Q-P| \leq d . $$
-The parameter pair @f$ u_{i}\; v_{i}\; (1\leq i \leq m) @f$ describes the parameters of node *Ni* on the surface:
+The parameter pair $u_{i}\; v_{i}\; (1\leq i \leq m)$ describes the parameters of node *Ni* on the surface:
-@f[ S(u_{i},v_{i})=N_{i} . @f]
+$$ S(u_{i},v_{i})=N_{i} . $$
-The triangle @f$ n_{j,1}\; n_{j,2}\; n_{j,3}\; (1\leq j \leq k) @f$ is interpreted as a triangle of nodes @f$ N_{n_{j},1}\; N_{n_{j},2}@f$ and @f$ N_{n_{j},3} @f$ with circular traversal of the nodes in the order @f$ N_{n_{j},1}\; N_{n_{j},2}@f$ and @f$ N_{n_{j},3} @f$. From any side of the triangulation *T* all its triangles have the same direction of the node circular traversal: either clockwise or counterclockwise.
+The triangle $n_{j,1}\; n_{j,2}\; n_{j,3}\; (1\leq j \leq k)$ is interpreted as a triangle of nodes $N_{n_{j},1}\; N_{n_{j},2}$ and $N_{n_{j},3}$ with circular traversal of the nodes in the order $N_{n_{j},1}\; N_{n_{j},2}$ and $N_{n_{j},3}$. From any side of the triangulation *T* all its triangles have the same direction of the node circular traversal: either clockwise or counterclockwise.
Triangulation record
-@verbatim
+```
4 2 1 0
0 0 0 0 0 3 0 2 3 0 2 0 0 0 3 0 3 -2 0 -2 2 4 3 2 1 4
-@endverbatim
+```
-describes a triangulation with *m*=4 nodes, *k*=2 triangles, parameter presence flag *p*=1, deflection *d*=0, nodes *N1*=(0,0,0), *N2*=(0,0,3), *N3*=(0,2,3) and *N4*=(0,2,0), parameters (*u1*, *v1*)=(0,0), (*u2*, *v2*)=(3,0), (*u3*, *v3*)=(3,-2) and (*u4*, *v4*)=(0,-2), and triangles (*n1,1*, *n1,2*, *n1,3*)=(2,4,3) and (*n2,1*, *n2,2*, *n2,3*)=(2,1,4). From the point (1,0,0) ((-1,0,0)) the triangles have clockwise (counterclockwise) direction of the node circular traversal.
+describes a triangulation with *m*=4 nodes, *k*=2 triangles, parameter presence flag *p*=1, deflection *d*=0, nodes *N1*=(0,0,0), *N2*=(0,0,3), *N3*=(0,2,3) and *N4*=(0,2,0), parameters (*u1*, *v1*)=(0,0), (*u2*, *v2*)=(3,0), (*u3*, *v3*)=(3,-2) and (*u4*, *v4*)=(0,-2), and triangles (*n1,1*, *n1,2*, *n1,3*)=(2,4,3) and (*n2,1*, *n2,2*, *n2,3*)=(2,1,4). From the point (1,0,0) ((-1,0,0)) the triangles have clockwise (counterclockwise) direction of the node circular traversal.
-@subsection specification__brep_format_6_5 Polygons on triangulations
+
+
**Example**
-@verbatim
+```
PolygonOnTriangulations 24
2 1 2
p 0.1 1 0 3
@@ -1547,11 +1656,11 @@ describes a triangulation with *m*=4 nodes, *k*=2 triangles, parameter presenc
p 0.1 1 0 1
2 2 3
p 0.1 1 0 1
-@endverbatim
+```
**BNF-like Definition**
-@verbatim
+```
= <_\n>
;
@@ -1584,30 +1693,32 @@ describes a triangulation with *m*=4 nodes, *k*=2 triangles, parameter presenc
( <_>) ^ ;
= ;
-@endverbatim
+```
**Description**
-\ describes a polyline *L* on a triangulation which approximates a curve *C*. The polyline data consist of a node count @f$ m \geq 2 @f$, node numbers @f$ n_{i} \geq 1 @f$, deflection @f$ d \geq 0 @f$, a parameter presence flag *p* and parameters @f$ u_{i}\; (1\leq i\leq m) @f$. The parameters are present only if *p*=1. The deflection *d* describes the deflection of polyline *L* from the curve *C*:
+\ describes a polyline *L* on a triangulation which approximates a curve *C*. The polyline data consist of a node count $m \geq 2$, node numbers $n_{i} \geq 1$, deflection $d \geq 0$, a parameter presence flag *p* and parameters $u_{i}\; (1\leq i\leq m)$. The parameters are present only if *p*=1. The deflection *d* describes the deflection of polyline *L* from the curve *C*:
-@f[ \underset{P \in C}{max}\; \underset{Q \in L}{min}|Q-P| \leq d . @f]
+$$ \underset{P \in C}{max}\; \underset{Q \in L}{min}|Q-P| \leq d . $$
-Parameter @f$ u_{i}\; (1\leq i\leq m) @f$ is *ni*-th node *C(ui)* parameter on curve *C*.
+Parameter $u_{i}\; (1\leq i\leq m)$ is *ni*-th node *C(ui)* parameter on curve *C*.
-@subsection specification__brep_format_6_6 Geometric Sense of a Curve
+
+
-Geometric sense of curve *C* described above is determined by the direction of parameter *u* increasing.
+Geometric sense of curve *C* described above is determined by the direction of parameter *u* increasing.
-@section specification__brep_format_7 Shapes
+
+
-An example of section shapes and a whole *.brep file are given in chapter 7 @ref specification__brep_format_8 "Appendix".
+An example of section shapes and a whole *.brep file are given in chapter 7 [Appendix](#specification__brep_format_8).
**BNF-like Definition**
-@verbatim
+```
= <_\n> <_\n> ;
= "TShapes" <_> ;
@@ -1642,19 +1753,19 @@ An example of section shapes and a whole *.brep file are given in chapter 7 @re
("So" <_\n> <_\n>) |
("CS" <_\n> <_\n>) |
("Co" <_\n> <_\n>);
-@endverbatim
+```
**Description**
-\ @f$ f_{1}\; f_{2}\; f_{3}\; f_{4}\; f_{5}\; f_{6}\; f_{7} @f$ \s @f$ f_{i}\;(1\leq i \leq 7) @f$ are interpreted as shape flags in the following way:
+\ $f_{1}\; f_{2}\; f_{3}\; f_{4}\; f_{5}\; f_{6}\; f_{7}$ \s $f_{i}\;(1\leq i \leq 7)$ are interpreted as shape flags in the following way:
- * @f$ f_{1} @f$ -- free;
- * @f$ f_{2} @f$ -- modified;
- * @f$ f_{3} @f$ -- IGNORED(version 1 only) \\ checked (version 2 or later);
- * @f$ f_{4} @f$ -- orientable;
- * @f$ f_{5} @f$ -- closed;
- * @f$ f_{6} @f$ -- infinite;
- * @f$ f_{7} @f$ -- convex.
+ * $f_{1}$ -- free;
+ * $f_{2}$ -- modified;
+ * $f_{3}$ -- IGNORED(version 1 only) \\ checked (version 2 or later);
+ * $f_{4}$ -- orientable;
+ * $f_{5}$ -- closed;
+ * $f_{6}$ -- infinite;
+ * $f_{7}$ -- convex.
The flags are used in a special way [1].
@@ -1682,14 +1793,15 @@ The flags are used in a special way [1].
\ determines the orientation and location for the whole model.
-@subsection specification__brep_format_7_1 Common Terms
+
+
The terms below are used by \, \ and \.
**BNF-like Definition**
-@verbatim
+```
= ;
<3D curve number> = ;
@@ -1708,7 +1820,7 @@ The terms below are used by \, \ and \.
=
real> <_> <_> <_> ;
-@endverbatim
+```
**Description**
@@ -1727,16 +1839,17 @@ The terms below are used by \, \ and \.
\ number is the number of a \ from subsection \ of section \.
\ numbering starts from 1.
-\ *umin* and *umax* are the curve parameter *u* bounds: *umin* @f$ \leq @f$ *u* @f$ \leq @f$ *umax*.
+\ *umin* and *umax* are the curve parameter *u* bounds: *umin* $\leq$ *u* $\leq$ *umax*.
-\ *umin* and *umax* are real pairs *xmin ymin* and *xmax ymax* that (*xmin*, *ymin*)= *C* (*umin*) and (*xmax*, *ymax*)= *C* (*umax*) where *C* is a parametric equation of the curve.
+\ *umin* and *umax* are real pairs *xmin ymin* and *xmax ymax* that (*xmin*, *ymin*)= *C* (*umin*) and (*xmax*, *ymax*)= *C* (*umax*) where *C* is a parametric equation of the curve.
-@subsection specification__brep_format_7_2 Vertex data
+
+
**BNF-like Definition**
-@verbatim
+```
= <_\n> <_\n>
;
@@ -1764,24 +1877,25 @@ The terms below are used by \, \ and \.
<_> ;
= ;
-@endverbatim
+```
**Description**
-The usage of \ *U* is described below.
+The usage of \ *U* is described below.
-\ and parameter *U* describe the position of the vertex *V* on a 3D curve *C*. Parameter *U* is a parameter of the vertex *V* on the curve *C*: *C(u)=V*.
+\ and parameter *U* describe the position of the vertex *V* on a 3D curve *C*. Parameter *U* is a parameter of the vertex *V* on the curve *C*: *C(u)=V*.
-\ and parameter *U* describe the position of the vertex *V* on a 2D curve *C* which is located on a surface. Parameter *U* is a parameter of the vertex *V* on the curve *C*: *C(u)=V*.
+\ and parameter *U* describe the position of the vertex *V* on a 2D curve *C* which is located on a surface. Parameter *U* is a parameter of the vertex *V* on the curve *C*: *C(u)=V*.
-\ and parameter *u* describe the position of the vertex *V* on a surface *S* through \ *v*: *S(u,v)=V*.
+\ and parameter *u* describe the position of the vertex *V* on a surface *S* through \ *v*: *S(u,v)=V*.
-\ *t* describes the maximum distance from the vertex *V* to the set *R* of vertex *V* representations:
+\ *t* describes the maximum distance from the vertex *V* to the set *R* of vertex *V* representations:
-@f[ \underset{P \in R }{max} |P-V| \leq t . @f]
+$$ \underset{P \in R }{max} |P-V| \leq t . $$
-@subsection specification__brep_format_7_3 Edge data
+
+
**BNF-like Definition**
@@ -1846,12 +1960,13 @@ Flags \, \ and \ describes a polyline on a triangulation.
-\ *t* describes the maximum distance from the edge *E* to the set *R* of edge *E* representations:
+\ *t* describes the maximum distance from the edge *E* to the set *R* of edge *E* representations:
-@f[ \underset{C \in R}{max}\;\underset{P \in E}{max}\;\underset{Q \in C}{min}|Q-P| \leq t @f]
+$$ \underset{C \in R}{max}\;\underset{P \in E}{max}\;\underset{Q \in C}{min}|Q-P| \leq t $$
-@subsection specification__brep_format_7_4 Face data
+
+
**BNF-like Definition**
@@ -1865,33 +1980,34 @@ Flags \, \ and \ describes a surface *S* of face *F* and a triangulation *T* of face *F*. The surface *S* may be empty: \ = 0.
+\ describes a surface *S* of face *F* and a triangulation *T* of face *F*. The surface *S* may be empty: \ = 0.
-\ *t* describes the maximum distance from the face *F* to the surface *S*:
+\ *t* describes the maximum distance from the face *F* to the surface *S*:
-@f[ \underset{P \in F}{max}\;\underset{Q \in S}{min}|Q-P| \leq t @f]
+$$ \underset{P \in F}{max}\;\underset{Q \in S}{min}|Q-P| \leq t $$
Flag \ is used in a special way [1].
-@section specification__brep_format_8 Appendix
+
+
This chapter contains a *.brep file example.
-@verbatim
+```
DBRep_DrawableShape
CASCADE Topology V1, (c) Matra-Datavision
Locations 3
1
- 0 0 1 0
- 1 0 0 0
- 0 1 0 0
+ 0 0 1 0
+ 1 0 0 0
+ 0 1 0 0
1
- 1 0 0 4
- 0 1 0 5
- 0 0 1 6
- 2 1 1 2 1 0
+ 1 0 0 4
+ 0 1 0 5
+ 0 0 1 6
+ 2 1 1 2 1 0
Curve2ds 24
1 0 0 1 0
1 0 0 1 0
@@ -2022,12 +2138,12 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 1 0 0 3
- 2 1 1 0 0 3
- 2 2 2 0 0 3
- 6 1 1 0
- 6 2 2 0
+ 1e-007 1 1 0
+ 1 1 0 0 3
+ 2 1 1 0 0 3
+ 2 2 2 0 0 3
+ 6 1 1 0
+ 6 2 2 0
0
0101000
@@ -2040,12 +2156,12 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 2 0 0 2
- 2 3 1 0 0 2
- 2 4 3 0 0 2
- 6 3 1 0
- 6 4 3 0
+ 1e-007 1 1 0
+ 1 2 0 0 2
+ 2 3 1 0 0 2
+ 2 4 3 0 0 2
+ 6 3 1 0
+ 6 4 3 0
0
0101000
@@ -2058,23 +2174,23 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 3 0 0 3
- 2 5 1 0 0 3
- 2 6 4 0 0 3
- 6 5 1 0
- 6 6 4 0
+ 1e-007 1 1 0
+ 1 3 0 0 3
+ 2 5 1 0 0 3
+ 2 6 4 0 0 3
+ 6 5 1 0
+ 6 6 4 0
0
0101000
-36 0 +34 0 *
Ed
- 1e-007 1 1 0
- 1 4 0 0 2
- 2 7 1 0 0 2
- 2 8 5 0 0 2
- 6 7 1 0
- 6 8 5 0
+ 1e-007 1 1 0
+ 1 4 0 0 2
+ 2 7 1 0 0 2
+ 2 8 5 0 0 2
+ 6 7 1 0
+ 6 8 5 0
0
0101000
@@ -2084,8 +2200,8 @@ Flag \ is used in a special way [1].
0101000
-37 0 -35 0 +33 0 +32 0 *
Fa
- 0 1e-007 1 0
- 2 1
+ 0 1e-007 1 0
+ 2 1
0101000
+31 0 *
Ve
@@ -2103,12 +2219,12 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 5 0 0 3
- 2 9 6 0 0 3
- 2 10 2 0 0 3
- 6 9 6 0
- 6 10 2 0
+ 1e-007 1 1 0
+ 1 5 0 0 3
+ 2 9 6 0 0 3
+ 2 10 2 0 0 3
+ 6 9 6 0
+ 6 10 2 0
0
0101000
@@ -2121,12 +2237,12 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 6 0 0 2
- 2 11 6 0 0 2
- 2 12 3 0 0 2
- 6 11 6 0
- 6 12 3 0
+ 1e-007 1 1 0
+ 1 6 0 0 2
+ 2 11 6 0 0 2
+ 2 12 3 0 0 2
+ 6 11 6 0
+ 6 12 3 0
0
0101000
@@ -2139,23 +2255,23 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 7 0 0 3
- 2 13 6 0 0 3
- 2 14 4 0 0 3
- 6 13 6 0
- 6 14 4 0
+ 1e-007 1 1 0
+ 1 7 0 0 3
+ 2 13 6 0 0 3
+ 2 14 4 0 0 3
+ 6 13 6 0
+ 6 14 4 0
0
0101000
-26 0 +24 0 *
Ed
- 1e-007 1 1 0
- 1 8 0 0 2
- 2 15 6 0 0 2
- 2 16 5 0 0 2
- 6 15 6 0
- 6 16 5 0
+ 1e-007 1 1 0
+ 1 8 0 0 2
+ 2 15 6 0 0 2
+ 2 16 5 0 0 2
+ 6 15 6 0
+ 6 16 5 0
0
0101000
@@ -2165,28 +2281,28 @@ Flag \ is used in a special way [1].
0101000
-27 0 -25 0 +23 0 +22 0 *
Fa
- 0 1e-007 6 0
- 2 6
+ 0 1e-007 6 0
+ 2 6
0101000
+21 0 *
Ed
- 1e-007 1 1 0
- 1 9 0 0 1
- 2 17 2 0 0 1
- 2 18 5 0 0 1
- 6 17 2 0
- 6 18 5 0
+ 1e-007 1 1 0
+ 1 9 0 0 1
+ 2 17 2 0 0 1
+ 2 18 5 0 0 1
+ 6 17 2 0
+ 6 18 5 0
0
0101000
-28 0 +38 0 *
Ed
- 1e-007 1 1 0
- 1 10 0 0 1
- 2 19 2 0 0 1
- 2 20 3 0 0 1
- 6 19 2 0
- 6 20 3 0
+ 1e-007 1 1 0
+ 1 10 0 0 1
+ 2 19 2 0 0 1
+ 2 20 3 0 0 1
+ 6 19 2 0
+ 6 20 3 0
0
0101000
@@ -2196,28 +2312,28 @@ Flag \ is used in a special way [1].
0101000
-19 0 -27 0 +18 0 +37 0 *
Fa
- 0 1e-007 2 0
- 2 2
+ 0 1e-007 2 0
+ 2 2
0101000
+17 0 *
Ed
- 1e-007 1 1 0
- 1 11 0 0 1
- 2 21 4 0 0 1
- 2 22 5 0 0 1
- 6 21 4 0
- 6 22 5 0
+ 1e-007 1 1 0
+ 1 11 0 0 1
+ 2 21 4 0 0 1
+ 2 22 5 0 0 1
+ 6 21 4 0
+ 6 22 5 0
0
0101000
-24 0 +34 0 *
Ed
- 1e-007 1 1 0
- 1 12 0 0 1
- 2 23 4 0 0 1
- 2 24 3 0 0 1
- 6 23 4 0
- 6 24 3 0
+ 1e-007 1 1 0
+ 1 12 0 0 1
+ 2 23 4 0 0 1
+ 2 24 3 0 0 1
+ 6 23 4 0
+ 6 24 3 0
0
0101000
@@ -2227,8 +2343,8 @@ Flag \ is used in a special way [1].
0101000
-15 0 -23 0 +14 0 +33 0 *
Fa
- 0 1e-007 4 0
- 2 4
+ 0 1e-007 4 0
+ 2 4
0101000
+13 0 *
Wi
@@ -2236,8 +2352,8 @@ Flag \ is used in a special way [1].
0101000
-32 0 -15 0 +22 0 +19 0 *
Fa
- 0 1e-007 5 0
- 2 5
+ 0 1e-007 5 0
+ 2 5
0101000
+11 0 *
Wi
@@ -2245,8 +2361,8 @@ Flag \ is used in a special way [1].
0101000
-35 0 -14 0 +25 0 +18 0 *
Fa
- 0 1e-007 3 0
- 2 3
+ 0 1e-007 3 0
+ 2 3
0101000
+9 0 *
Sh
@@ -2276,9 +2392,9 @@ Flag \ is used in a special way [1].
0101101
*
Ed
- 1e-007 1 1 0
- 1 13 0 0 1
- 5 1 0
+ 1e-007 1 1 0
+ 1 13 0 0 1
+ 5 1 0
0
0101000
@@ -2290,4 +2406,4 @@ Flag \ is used in a special way [1].
+1 0
0
-@endverbatim
+```
diff --git a/dox/build/build_occt/images/genconf_linux.png b/dox/build/build_occt/images/genconf_linux.png
deleted file mode 100644
index 9125c47421..0000000000
Binary files a/dox/build/build_occt/images/genconf_linux.png and /dev/null differ
diff --git a/dox/build/build_occt/images/genconf_windows.png b/dox/build/build_occt/images/genconf_windows.png
deleted file mode 100644
index 409dff035c..0000000000
Binary files a/dox/build/build_occt/images/genconf_windows.png and /dev/null differ
diff --git a/dox/build/build_upgrade.md b/dox/build/build_upgrade.md
deleted file mode 100644
index 711577f3cf..0000000000
--- a/dox/build/build_upgrade.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Build, Debug and Upgrade {#build_upgrade}
-=================
-
-This chapter contains the detailed information about building, debugging and upgrade procedures:
-
-* @subpage build_upgrade__building_occt
-* @subpage build_upgrade_building_3rdparty
-* @subpage build_upgrade__building_documentation
-* @subpage occt__debug
-* @subpage occt__upgrade
diff --git a/dox/build_upgrade.md b/dox/build_upgrade.md
new file mode 100644
index 0000000000..dbbd15f5f1
--- /dev/null
+++ b/dox/build_upgrade.md
@@ -0,0 +1,9 @@
+# Build, Debug and Upgrade
+
+This chapter contains the detailed information about building, debugging and upgrade procedures:
+
+* [Building OCCT](building_occt)
+* [Building Third-Party Libraries](building_3rdparty)
+* [Building Documentation](building_documentation)
+* [Debug](debug)
+* [Upgrade](upgrade)
diff --git a/dox/build/build_3rdparty/building_3rdparty.md b/dox/building_3rdparty.md
similarity index 93%
rename from dox/build/build_3rdparty/building_3rdparty.md
rename to dox/building_3rdparty.md
index bc7d892671..6b5a1f67f8 100644
--- a/dox/build/build_3rdparty/building_3rdparty.md
+++ b/dox/building_3rdparty.md
@@ -1,11 +1,8 @@
- Build 3rd-parties {#build_upgrade_building_3rdparty}
-==============================================
-@tableofcontents
-
+# Build 3rd-parties
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 macOS, it is recommended to use the version installed in the system natively.
-@section dev_guides__building_3rdparty_win_1 Windows
+
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++.
@@ -15,7 +12,7 @@ You need to use the same version of MS Visual Studio for building all third-part
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
+
Tcl/Tk is required for DRAW test harness.
@@ -77,7 +74,7 @@ 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
+
FreeType is required for text display in a 3D viewer.
You can download its sources from https://freetype.org/
@@ -96,12 +93,11 @@ You can download its sources from https://freetype.org/
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}
+
Update the value of the Output File for `x64` configuration:
- @figure{/build/build_3rdparty/images/3rdparty_image003.png}
+
Build the `freetype` project.
As a result, you will obtain a 64 bit import library (`.lib`) file in the `freetype/x64/vc20xx` folder.
@@ -126,7 +122,7 @@ You can download its sources from https://freetype.org/
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
+
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Windows platform.
@@ -136,7 +132,7 @@ Unpack the downloaded archive of TBB product into the `3rdparty` folder.
Further in this document, this folder is referred to as `tbb`.
-@subsection dev_guides__building_3rdparty_win_3_3 FreeImage
+
This third-party product should be built as a dynamically loadable library (`.dll` file).
You can download its sources from
@@ -194,7 +190,7 @@ https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
5. Start the building process.
As a result, you should have the library files of FreeImage product in `freeimage/Dist` folder (`FreeImage.dll` and `FreeImage.lib`).
-@subsection dev_guides__building_3rdparty_win_3_4 VTK
+
VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library.
@@ -210,11 +206,11 @@ VTK Integration Services component provides adaptation functionality for visuali
3. Build project VTK in Release mode.
-@section build_3rdparty_linux Linux
+
This section presents additional guidelines for building third-party products used by Open CASCADE Technology and samples on Linux platform.
-@subsection dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
+
**Debian-based distributives**
@@ -228,7 +224,7 @@ Building is possible with C++ compliant compiler:
sudo apt-get install g++
-@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
+
Tcl/Tk is required for DRAW test harness.
@@ -279,7 +275,7 @@ Download the necessary archive from https://www.tcl.tk/software/tcltk/download.h
make install
-@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
+
FreeType is required for text display in the 3D viewer.
Download the necessary archive from https://freetype.org/ and unpack it.
@@ -303,13 +299,13 @@ Download the necessary archive from https://freetype.org/ and unpack it.
make install
-@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/oneapi-src/oneTBB/releases/tag/v2021.5.0.
Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Linux platform.
To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-lin.tgz`).
-@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
+
Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/ and unpack it.
The directory with unpacked sources is further referred to as `FREEIMAGE_SRC_DIR`.
@@ -375,7 +371,7 @@ The directory with unpacked sources is further referred to as `FREEIMAGE_SRC_DI
make clean
-@subsection dev_guides__building_3rdparty_linux_3_4 VTK
+
Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it.
@@ -397,12 +393,12 @@ Download the necessary archive from https://www.vtk.org/VTK/resources/software.h
make install
-@section build_3rdparty_macos Mac OS X
+
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).
-@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk
+
Tcl/Tk is required for DRAW test harness.
@@ -452,7 +448,7 @@ Download the necessary archive from https://www.tcl.tk/software/tcltk/download.h
make install
-@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://freetype.org/ and unpack it.
@@ -476,13 +472,13 @@ Download the necessary archive from https://freetype.org/ and unpack it.
make install
-@subsection dev_guides__building_3rdparty_osx_3_1 TBB
+
This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Mac OS X platform.
To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-mac.tgz`).
-@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage
+
Download the necessary archive from
https://sourceforge.net/projects/freeimage/files/Source%20Distribution/
diff --git a/dox/build/build_documentation/building_documentation.md b/dox/building_documentation.md
similarity index 69%
rename from dox/build/build_documentation/building_documentation.md
rename to dox/building_documentation.md
index 994be6e949..7320a3216b 100644
--- a/dox/build/build_documentation/building_documentation.md
+++ b/dox/building_documentation.md
@@ -1,5 +1,4 @@
-Build Documentation {#build_upgrade__building_documentation}
-=================
+# Build Documentation
To generate HTML documentation from sources contained in *dox* subdirectory,
you need to have Tcl and Doxygen 1.8.5 (or above) installed on your system.
@@ -16,4 +15,4 @@ To generate Reference manual:
Run this command without arguments to get help on supported options.
-See @ref occt_contribution__documentation for prerequisites and details on OCCT documentation system.
+See [Link](contribution#occt_contribution__documentation) for prerequisites and details on OCCT documentation system.
diff --git a/dox/build/build_occt/building_occt.md b/dox/building_occt.md
similarity index 86%
rename from dox/build/build_occt/building_occt.md
rename to dox/building_occt.md
index 00036c3b39..49c19b04c9 100644
--- a/dox/build/build_occt/building_occt.md
+++ b/dox/building_occt.md
@@ -1,20 +1,17 @@
-Build OCCT {#build_upgrade__building_occt}
-===================
-
-@tableofcontents
+# Build OCCT
Before building OCCT, make sure to have all required third-party libraries installed.
The list of required libraries depends on what OCCT modules will be used, and your preferences.
The typical minimum is **FreeType** (necessary for Visualization) and **Tcl/Tk** (for DRAW).
-See @ref intro_req "requirements on 3rdparty libraries" for a full list.
+See [requirements on 3rdparty libraries](#intro_req) for a full list.
The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to your target configuration,
from [Development Portal](https://dev.opencascade.org/resources/download/3rd-party-components).
-You can also build third-party libraries from their sources, see @ref build_upgrade_building_3rdparty for instructions.
+You can also build third-party libraries from their sources, see [Link](#build_upgrade_building_3rdparty) for instructions.
On Linux and macOS we recommend to use libraries maintained by distributive developers, when possible.
-@section build_occt_win_cmake Building with CMake tool
+
This chapter describes the [CMake](https://cmake.org/download/)-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources.
OCCT requires CMake version 3.1 or later.
@@ -39,7 +36,7 @@ It is however possible to choose one installation directory for several configur
d:/occt-install - the installation directory that is
able to contain several OCCT configurations
-@subsection build_cmake_conf Configuration process
+
For unexperienced users we recommend to start with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux.
A command-line alternative, *ccmake* can also be used.
@@ -49,21 +46,20 @@ If the command-line tool is used, run the tool from the build directory with a s
cd d:/tmp/occt-build-vc10-x64
ccmake d:/occt
-@figure{/build/build_occt/images/cmake_image000.png}
+
If the GUI tool is used, run this tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**:
-@figure{/build/build_occt/images/cmake_image001.png}
+
-@note Each configuration of the project should be built in its own directory.
-When building multiple configurations it is suggested to indicate in the name of build directories the system, bitness and compiler (e.g., d:/occt/build/win32-vc10).
+> **Note:** Each configuration of the project should be built in its own directory. When building multiple configurations it is suggested to indicate in the name of build directories the system, bitness and compiler (e.g., d:/occt/build/win32-vc10).
Once the source and build directories are selected, "Configure" button should be pressed in order to start manual configuration process.
It begins with selection of a target configurator. It is "Visual Studio 10 2010 Win64" in our example.
-@figure{/build/build_occt/images/cmake_image002.png}
+
-@note To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling d:/occt/adm/templates/uwp.toolchain.config.cmake.
+> **Note:** To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling d:/occt/adm/templates/uwp.toolchain.config.cmake.
Alternatively, if you are using CMake from the command line add options `-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0`.
Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015".
File `CASROOT/samples/xaml/ReadMe.md` describes the building procedure of XAML (UWP) sample.
@@ -71,7 +67,7 @@ File `CASROOT/samples/xaml/ReadMe.md` describes the building procedure of XAML (
Once "Finish" button is pressed, the first pass of the configuration process is executed.
At the end of the process, CMake outputs the list of environment variables, which have to be properly specified for successful configuration.
-@figure{/build/build_occt/images/cmake_image003.png}
+
The error message provides some information about these variables.
This message will appear after each pass of the process until all required variables are specified correctly.
@@ -79,7 +75,7 @@ This message will appear after each pass of the process until all required varia
The change of the state of some variables can lead to the appearance of new variables.
The new variables appeared after the pass of the configuration process are highlighted with red color by CMake GUI tool.
-@note There is "grouped" option, which groups variables with a common prefix.
+> **Note:** There is "grouped" option, which groups variables with a common prefix.
The following table gives the full list of environment variables used at the configuration stage:
@@ -95,14 +91,14 @@ The following table gives the full list of environment variables used at the con
| USE_DRACO | Boolean | Indicates whether Draco product should be used in OCCT Data Exchange module for support of Draco compression in glTF mesh file format |
| USE_TK | Boolean | Indicates whether Tcl/Tk product should be used in OCCT Draw Harness module for user interface (in addition to Tcl, which is mandatory for Draw Harness) |
| USE_TBB | Boolean | Indicates whether TBB (Threading Building Blocks) 3rd party is used or not. Note that OCCT remains parallel even without TBB product |
-| USE_VTK | Boolean | Indicates whether VTK 3rd party is used or not. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. See the official documentation @ref occt_user_guides__vis for the details on VIS |
+| USE_VTK | Boolean | Indicates whether VTK 3rd party is used or not. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. See the official documentation [Link](#occt_user_guides__vis) for the details on VIS |
| 3RDPARTY_DIR | Path | Defines the root directory where all required 3rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products|
| 3RDPARTY_FREETYPE_* | Path | Path to FreeType binaries |
| 3RDPARTY_TCL_* 3RDPARTY_TK_* | Path | Path to Tcl/Tk binaries |
| 3RDPARTY_FREEIMAGE* | Path | Path to FreeImage binaries |
| 3RDPARTY_TBB* | Path | Path to TBB binaries |
| 3RDPARTY_VTK_* | Path | Path to VTK binaries |
-| BUILD_MODULE_| Boolean | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
+| BUILD_MODULE_| Boolean | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in [Link](#user_guides) |
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it is disabled for these builds.|
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
| BUILD_YACCLEX | Boolean | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
@@ -116,16 +112,16 @@ The following table gives the full list of environment variables used at the con
| BUILD_CPP_STANDARD | String | Employ corresponding c++ standard (C++11, C++14, ..C++23) for building OCCT |
| CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations |
| INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* |
-| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
-| INSTALL_DIR_SCRIPT | Path | Relative path to the scripts installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}) |
-| INSTALL_DIR_LIB | Path | Relative path to the libraries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_LIB}) |
-| INSTALL_DIR_INCLUDE | Path | Relative path to the includes installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}) |
-| INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) |
+| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_BIN}) |
+| INSTALL_DIR_SCRIPT | Path | Relative path to the scripts installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}) |
+| INSTALL_DIR_LIB | Path | Relative path to the libraries installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_LIB}) |
+| INSTALL_DIR_INCLUDE | Path | Relative path to the includes installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}) |
+| INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) |
| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables |
-| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) |
-| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) |
-| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) |
-| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DOC}) |
+| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_DATA}) |
+| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) |
+| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_TESTS}) |
+| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is \${INSTALL_DIR}/${INSTALL_DIR_DOC}) |
| INSTALL_FREETYPE | Boolean | Indicates whether FreeType binaries should be installed into the installation directory |
| INSTALL_FREEIMAGE | Boolean | Indicates whether FreeImage binaries should be installed into the installation directory |
| INSTALL_TBB | Boolean | Indicates whether TBB binaries should be installed into the installation directory |
@@ -134,9 +130,9 @@ The following table gives the full list of environment variables used at the con
| INSTALL_TEST_CASES | Boolean | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
| INSTALL_DOC_Overview | Boolean | Indicates whether OCCT overview documentation should be installed into the installation directory |
-@note Only the forward slashes ("/") are acceptable in the CMake options defining paths.
+> **Note:** Only the forward slashes ("/") are acceptable in the CMake options defining paths.
-@subsubsection build_cmake_3rdparty 3rd party search mechanism
+
If `3RDPARTY_DIR` directory is defined, then required 3rd party binaries are sought in it, and default system folders are ignored.
The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*.
@@ -147,7 +143,7 @@ The results of the search (achieved on the next pass of the configuration proces
* `3RDPARTY__INCLUDE_DIR` -- path to the directory containing a header file (e.g., D:/3rdparty/tcltk-86-32/include);
* `3RDPARTY__DLL_DIR` -- path to the directory containing a shared library (e.g., D:/3rdparty/tcltk-86-32/bin) This variable is only relevant to Windows platforms.
-@note Each library and include directory should be children of the product directory if the last one is defined.
+> **Note:** Each library and include directory should be children of the product directory if the last one is defined.
The search process is as follows:
@@ -175,20 +171,20 @@ can be changed to
During the configuration process the related variables (`3RDPARTY_FREETYPE_DLL_DIR`, `3RDPARTY_FREETYPE_INCLUDE_DIR` and `3RDPARTY_FREETYPE_LIBRARY_DIR`) will be filled with new found values.
-@note The names of searched libraries and header files are hard-coded.
+> **Note:** The names of searched libraries and header files are hard-coded.
If there is the need to change their names, change appropriate CMake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration:
`3RDPARTY__INCLUDE` for include, `3RDPARTY__LIB` for library and `3RDPARTY__DLL` for shared library.
-@subsection build_cmake_gen Projects generation
+
Once the configuration process is done, the "Generate" button is used to prepare project files for the target IDE.
In our exercise the Visual Studio solution will be automatically created in the build directory.
-@subsection build_cmake_build Building
+
Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**.
-@figure{/build/build_occt/images/cmake_image004.png}
+
By default, the build solution process skips the building of the INSTALL and Overview projects.
When the building process is finished build:
@@ -197,7 +193,7 @@ When the building process is finished build:
For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer.
-@subsection build_cmake_install Installation
+
Installation is a process of extracting redistributable resources (binaries, include files etc) from the build directory into the installation one.
The installation directory will be free of project files, intermediate object files and any other information related to the build routines.
@@ -214,7 +210,7 @@ The directory structure is as follows:
win32\vc10\bind - binary files (installed 3rdparties and occt)
\libd - libraries (installed 3rdparties and occt)
-@note The above example is given for debug configuration.
+> **Note:** The above example is given for debug configuration.
However, it is generally safe to use the same installation directory for the release build.
In the latter case the contents of install directory will be enriched with subdirectories and files related to the release configuration.
In particular, the binaries directory win64 will be expanded as follows:
@@ -229,7 +225,7 @@ Such organization of libraries can be especially helpful if your OCCT-based soft
The installation folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*), samples (if they were installed) and overview.html (short-cut for installed OCCT overview documentation).
-@subsection build_occt_crossplatform_cmake Cross-compiling (Android)
+
This section describes the steps to build OCCT libraries for Android from a complete source package with GNU make (makefiles).
The steps on Windows 7 and Ubuntu 15.10 are similar. There is the only one difference: makefiles are built with mingw32-make on Windows and native GNU make on Ubuntu.
@@ -244,31 +240,31 @@ Run GUI tool provided by CMake and:
- Specify the root folder of OCCT (`$CASROOT`, which contains *CMakelists.txt* file) by clicking **Browse Source**.
- Specify the location (build folder) for CMake generated project files by clicking **Browse Build**.
-@figure{/build/build_occt/images/android_image001.png}
+
Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project.
Select "MinGW MakeFiles" item from the list
- Choose "Specify toolchain file for cross-compiling", and click "Next".
-@figure{/build/build_occt/images/android_image002.png}
+
- Specify a toolchain file at the next dialog to `android.toolchain.cmake`, and click "Finish".
-@figure{/build/build_occt/images/android_image003.png}
+
If `ANDROID_NDK` environment variable is not defined in current OS, add cache entry `ANDROID_NDK` (entry type is `PATH`) -- path to the NDK folder ("Add Entry" button):
-@figure{/build/build_occt/images/android_image004.png}
+
If on Windows the message is appeared:
"CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles" CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.",
specify `CMAKE_MAKE_PROGRAM` to mingw32-make executable.
-@figure{/build/build_occt/images/android_image005.png}
+
-How to configure OCCT, see @ref build_cmake_conf "Configure" section taking into account the specific configuration variables for Android:
+How to configure OCCT, see [Configure](#build_cmake_conf) section taking into account the specific configuration variables for Android:
- `ANDROID_ABI` = `armeabi-v7a`
- `ANDROID_NATIVE_API_LEVEL` = `15`
- `ANDROID_NDK_LAYOUT` is equal to `CMAKE_BUILD_TYPE` variable
- `BUILD_MODULE_Draw` = `OFF`
-@figure{/build/build_occt/images/android_image006.png}
+
Click **Generate** button and wait until the generation process is finished.
Then makefiles will appear in the build folder (e.g. D:/tmp/occt-android ).
diff --git a/dox/contribution/coding_rules.md b/dox/coding_rules.md
similarity index 97%
rename from dox/contribution/coding_rules.md
rename to dox/coding_rules.md
index 70e151f020..86eefbd161 100644
--- a/dox/contribution/coding_rules.md
+++ b/dox/coding_rules.md
@@ -1,9 +1,6 @@
-Coding Rules {#occt_contribution__coding_rules}
-======================================
+# Coding Rules
-@tableofcontents
-
-@section occt_coding_rules_1 Introduction
+
The purpose of this document is to define a common programming style for Open CASCADE Technology.
@@ -13,7 +10,7 @@ OCCT programming style follows common and appropriate best practices, so some gu
The guide can be improved in the future as new ideas and enhancements are added.
-@subsection occt_coding_rules_1_1 Scope of the document
+
Rules in this document refer to C++ code. However, with minor exceptions due to language restrictions, they are applicable to any sources in Open CASCADE Technology framework, including:
- C/C++
@@ -21,9 +18,9 @@ Rules in this document refer to C++ code. However, with minor exceptions due to
- OpenCL kernels
- TCL scripts and test cases
-@section occt_coding_rules_2 Naming Conventions
+
-@subsection occt_coding_rules_2_1 General naming rules
+
The names considered in this section mainly refer to the interface of Open CASCADE Technology libraries or source code itself.
@@ -54,7 +51,7 @@ Standard_Integer width_of_box; // this is bad
Standard_Integer aWidthOfBox; // this is OK
~~~~
-@subsection occt_coding_rules_2_2 Names of development units
+
Usually a unit (e.g. a package) is a set of classes, methods, enumerations or any other sources implementing a common functionality, which is self-contained and independent from other parts of the library.
@@ -95,6 +92,7 @@ This rule also applies to complex types constructed by instantiation of template
Such types should be given own names using *typedef* statement, located in same-named header file.
For example, see definition in the file *TColStd_IndexedDataMapOfStringString.hxx*:
+
~~~~{.cpp}
typedef NCollection_IndexedDataMap TColStd_IndexedDataMapOfStringString;
~~~~
@@ -108,7 +106,6 @@ The term **function** here is defined as:
It is preferred to start names of public methods from an upper case character and to start names of protected and private methods from a lower case character.
-
~~~~{.cpp}
class MyPackage_MyClass
{
@@ -125,7 +122,7 @@ private:
};
~~~~
-@subsection occt_coding_rules_2_3 Names of variables
+
There are several rules that describe currently accepted practices for naming variables.
@@ -182,6 +179,7 @@ Standard_Integer MyPackage_MyClass_myGlobalVariable = 0;
~~~~
Static constants within the file should be written in upper-case and begin with prefix *THE_*:
+
~~~~{.cpp}
namespace
{
@@ -229,7 +227,7 @@ void Average (const Standard_Real** theArray,
}
~~~~
-@section occt_coding_rules_3 Formatting rules
+
To improve the open source readability and, consequently, maintainability, the following set of rules is applied.
@@ -508,7 +506,7 @@ The source or header file should include only minimal set of headers necessary f
#include
~~~~
-@section occt_coding_rules_4 Documentation rules
+
The source code is one of the most important references for documentation.
The comments in the source code should be complete enough to allow understanding the corresponding code and to serve as basis for other documents.
@@ -533,12 +531,12 @@ Each class or package method should be documented in the header file (.hxx).
The comment should explain the purpose of the method, its parameters, and returned value(s).
Accepted style is:
-@verbatim
+```cpp
//! Method computes the square value.
//! @param theValue the input value
//! @return squared value
Standard_Export Standard_Real Square (Standard_Real theValue);
-@endverbatim
+```
### Documenting C/C++ sources
@@ -548,11 +546,11 @@ They should be detailed enough to allow any person to understand what each part
It is recommended to comment all static functions (like methods in headers), and to insert at least one comment per each 10-100 lines in the function body.
-There are also some rules that define how comments should be formatted, see @ref occt_coding_rules_3 "Formatting Rules".
+There are also some rules that define how comments should be formatted, see [Formatting Rules](#occt_coding_rules_3).
Following these rules is important for good comprehension of the comments. Moreover, this approach allows automatically generating user-oriented documentation directly from the commented sources.
-@section occt_coding_rules_5 Application design
+
The following rules define the common style, which should be applied by any developer contributing to the open source.
@@ -588,7 +586,7 @@ When compiling the source pay attention to and try to minimize compiler warnings
Try to minimize compilation dependencies by removing unnecessary inclusions.
-@section occt_coding_rules_6 General C/C++ rules
+
This section defines the rules for writing a portable and maintainable C/C++ source code.
@@ -701,7 +699,7 @@ void Function (Standard_Integer theValue,
}
~~~~
-@section occt_coding_rules_7 Portability issues
+
This chapter contains rules that are critical for cross-platform portability.
@@ -734,7 +732,7 @@ Do not assume sizes of types. Use *sizeof()* instead to calculate sizes.
In accordance with C++03 standard source files should be trailed by an empty line.
It is recommended to follow this rule for any plain text files for consistency and for correct work of git difference tools.
-@section occt_coding_rules_8 Stability issues
+
The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries.
@@ -859,7 +857,7 @@ Do not throw from within a destructor.
Avoid the assignment of a temporary object to a reference. This results in a different behavior for different compilers on different platforms.
-@section occt_coding_rules_9 Performance issues
+
These rules define the ways of avoiding possible loss of performance caused by ineffective programming.
@@ -932,7 +930,7 @@ for (Standard_Integer anIter = 0; anIter < 4096; ++anIter)
since linear access does not invalidate cache too often.
-@section occt_coding_rules_10 Draw Harness command
+
Draw Harness provides TCL interface for OCCT algorithms.
@@ -1022,11 +1020,11 @@ Functions *Draw::Atof()* and *Draw::Atoi()* support expressions and read values
}
~~~~
-@section occt_coding_rules_11 Examples
+
### Sample documented class
-@verbatim
+```cpp
class Package_Class
{
@@ -1047,11 +1045,9 @@ private: //! \@name private fields
Standard_Integer myCounter; //!< usage counter
};
+```
-
-@endverbatim
-
-~~~~{.cpp}
+```cpp
#include
// ==========================================================
// function : Square
@@ -1071,7 +1067,7 @@ void Package_Class::increment()
{
++myCounter;
}
-~~~~
+```
### TCL script for Draw Harness
@@ -1109,6 +1105,7 @@ vdump $imagedir/${casename}.png 512 512
~~~~
### GLSL program:
+
~~~~{.cpp}
vec3 Ambient; //!< Ambient contribution of light sources
vec3 Diffuse; //!< Diffuse contribution of light sources
diff --git a/dox/contribution.md b/dox/contribution.md
new file mode 100644
index 0000000000..197f3004eb
--- /dev/null
+++ b/dox/contribution.md
@@ -0,0 +1,9 @@
+# Contribution
+
+This chapter contains the detailed information about contribution procedure:
+
+* [Contribution Workflow](contribution_workflow)
+* [Git Guide](git_guide)
+* [Coding Rules](coding_rules)
+* [Tests](tests)
+* [Documentation](documentation)
diff --git a/dox/contribution/contribution.md b/dox/contribution/contribution.md
deleted file mode 100644
index 61042ec1e8..0000000000
--- a/dox/contribution/contribution.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Contribution {#contribution}
-============
-
-This chapter contains the detailed information about contribution procedure:
-
-* @subpage occt_contribution__contribution_workflow
-* @subpage occt_contribution__git_guide
-* @subpage occt_contribution__coding_rules
-* @subpage occt_contribution__tests
-* @subpage occt_contribution__documentation
diff --git a/dox/contribution/contribution_workflow/contribution_workflow.md b/dox/contribution_workflow.md
similarity index 83%
rename from dox/contribution/contribution_workflow/contribution_workflow.md
rename to dox/contribution_workflow.md
index 0b7f7be8a6..202869b3b3 100644
--- a/dox/contribution/contribution_workflow/contribution_workflow.md
+++ b/dox/contribution_workflow.md
@@ -1,19 +1,17 @@
-Contribution Workflow {#occt_contribution__contribution_workflow}
-====================================
-@tableofcontents
+# Contribution Workflow
-@section occt_contribution_intro Introduction
+
The purpose of this document is to describe standard workflow for processing contributions to certified version of OCCT.
-@subsection occt_contribution_intro_tracker Use of issue tracker system
+
Each contribution should have corresponding issue (bug, or feature, or integration request)
registered in the MantisBT issue tracker system accessible by URL
https://tracker.dev.opencascade.org.
The issue is processed according to the described workflow.
-@subsection occt_contribution_intro_access Access levels
+
Access level defines the permissions of the user to view, register and modify issues in the issue tracker.
The correspondence of access level and user permissions is defined in the table below.
@@ -30,17 +28,17 @@ The correspondence of access level and user permissions is defined in the table
According to his access level, the user can participate in the issue handling process under different roles, as described below.
-@section occt_contribution_workflow Standard workflow for an issue
+
-@subsection occt_contribution_workflow_general General scheme
+
-@figure{OCCT_ContributionWorkflow_V3_image001.svg,"Standard life cycle of an issue",360}
+
-@subsection occt_contribution_workflow_issue Issue registration
+
-An issue is registered in Mantis bugtracker by the **Reporter** with definition of the necessary attributes (see also @ref occt_contribution_app):
+An issue is registered in Mantis bugtracker by the **Reporter** with definition of the necessary attributes (see also [Link](#occt_contribution_app)):
**Category** -- indicates the OCCT component, to which the issue relates.
(If in doubt, assign to OCCT:Foundation Classes.)
@@ -57,7 +55,7 @@ Additional details relevant for the environment where the issue is reproduced (s
It is preferable to indicate the version of the earliest known official release where the problem can be reproduced.
If the issue is reported on the current development version of OCCT, the current development version should be used (for convenience, this version is marked by asterisk in Mantis).
-@note OCCT version number can be consulted in the file Standard_Version.hxx (value of OCC_VERSION_COMPLETE macro).
+> **Note:** OCCT version number can be consulted in the file Standard_Version.hxx (value of OCC_VERSION_COMPLETE macro).
**Assign to** -- developer to whom the issue will be assigned.
By default, it is set to **Maintainer** of the OCCT component selected in **Category** field.
@@ -93,14 +91,14 @@ Example:
> *Currently selection does not work correctly for non-zoomable objects (those defined using transform persistence). To provide correct selection for such objects, first-level (object) BVH structures must be updated on each camera change, and frustum must be rebuilt accordingly.*
-@note In the description and notes to the issues you can refer to another issue by its ID prefixed by number sign (e.g.: #12345), and refer to a note by its ID prefixed by tilde (e.g.: ~20123).
+> **Note:** In the description and notes to the issues you can refer to another issue by its ID prefixed by number sign (e.g.: #12345), and refer to a note by its ID prefixed by tilde (e.g.: ~20123).
These references will be expanded by Mantis into links to the corresponding issue or note.
When the number sign or the tilde followed by digits are a part of a normal text, add a space before digits (e.g.: "face # 12345 contains ~ 1000 edges") to avoid this conversion.
**Steps To Reproduce** -- allows describing in detail how to reproduce the issue.
This information is crucial for the developer to investigate the cause of the problem and to create the test case.
-The optimal approach is to give a sequence of @ref occt_user_guides__test_harness "DRAW Test Harness" commands to reproduce the problem in DRAW.
+The optimal approach is to give a sequence of [DRAW Test Harness](#occt_user_guides__test_harness) commands to reproduce the problem in DRAW.
This information can also be provided as a DRAW Tcl script attached to the issue (in **Upload File** field).
**Additional information and documentation updates** -- any additional information, remarks to be taken into account in Release Notes, etc..
@@ -112,7 +110,7 @@ Where applicable, pictures demonstrating a problem and/or desired result can be
The newly registered issue gets status **NEW** and is assigned to the person indicated in the **Assign to** field.
-@subsection occt_contribution_workflow_assign Assigning the issue
+
The description of the new issue is checked by the **Maintainer** and if it is feasible, he may assign the issue to a **Developer**.
Alternatively, any user with **Developer** access level or higher can assign the issue to himself if he wants to provide a solution.
@@ -124,7 +122,7 @@ That decision shall be documented in the comments to the issue in the Bugtracker
The assigned issue has status **ASSIGNED**.
-@subsection occt_contribution_workflow_fix Resolving the issue
+
The **Developer** responsible for the issue assigned to him provides a solution including:
@@ -137,58 +135,60 @@ Then the issue is switched to **RESOLVED** for further review and testing.
The following sub-sections describe this process, relevant requirements and options, in more details.
-@subsubsection occt_contribution_workflow_fix_code Requirements to the code modification
+
+
The amount of code affected by the change should be limited to the changes required for the bug fix or improvement.
Change of layout or re-formatting of the existing code is allowed only in the parts where meaningful changes related to the issue have been made.
-@note If deemed useful, re-formatting or cosmetic changes affecting considerable parts of the code can be made within a dedicated issue.
+> **Note:** If deemed useful, re-formatting or cosmetic changes affecting considerable parts of the code can be made within a dedicated issue.
-The changes should comply with the OCCT @ref occt_contribution__coding_rules "Codng Rules".
+The changes should comply with the OCCT [Codng Rules](#occt_contribution__coding_rules).
It is especially important to comment the code properly so that other people can understand it easier.
The modification should be tested by running OCCT tests (on the platform and scope available to **Developer**) and ensuring absence of regressions.
In case if modification affects results of some existing test case and the new result is correct,
-such test case should be updated to report OK (or BAD), as described in @ref testmanual_details_results "Automated Test System / Interpretation of Test Results".
+such test case should be updated to report OK (or BAD), as described in [Automated Test System / Interpretation of Test Results](#testmanual_details_results).
-@subsubsection occt_contribution_workflow_fix_test Providing a test case
+
For modifications affecting OCCT functionality, a test case should be created (unless already exists) and included in the commit or patch.
-See @ref testmanual_intro_quick_create "Automated Test System / Creating a New Test" for relevant instructions.
+See [Automated Test System / Creating a New Test](#testmanual_intro_quick_create) for relevant instructions.
The data files required for a test case should be attached to the corresponding issue in Mantis (i.e. not included in the commit).
When the test case cannot be provided for any reason, the maximum possible information on how the problem can be reproduced and how to check the fix should be provided in the **Steps to Reproduce** field of an issue.
-@subsubsection occt_contribution_workflow_fix_doc Updating user and developer guides
+
-If the change affects a functionality described in @ref user_guides "User Guides", the corresponding user guide should be updated to reflect the change.
+If the change affects a functionality described in [User Guides](#user_guides), the corresponding user guide should be updated to reflect the change.
-If the change affects OCCT test system, build environment, or development tools described in @ref build_upgrade "Build, Debug and Upgrade" or @ref contribution "Contribution", the corresponding guide should be updated.
+If the change affects OCCT test system, build environment, or development tools described in [Build, Debug and Upgrade](#build_upgrade) or [Contribution](#contribution), the corresponding guide should be updated.
-The changes that break compatibility with the previous versions of OCCT (i.e. affecting API or behavior of existing functionality in the way that may require update of existing applications based on an earlier official release of OCCT to work correctly) should be described in the document @ref occt__upgrade "Upgrade from previous OCCT versions".
+The changes that break compatibility with the previous versions of OCCT (i.e. affecting API or behavior of existing functionality in the way that may require update of existing applications based on an earlier official release of OCCT to work correctly) should be described in the document [Upgrade from previous OCCT versions](#occt__upgrade).
It is recommended to add a sub-section for each change described.
The description should provide the explanation of the incompatibility introduced by the change, and describe how it can be resolved (at least, in known situations).
When feasible, the automatic upgrade procedure (adm/upgrade.tcl) can be extended by a new option to perform the required upgrade of the dependent code automatically.
-@subsubsection occt_contribution_workflow_fix_git Submission of change as a Git branch
+
+
The modification of sources should be provided in the dedicated branch of the official OCCT Git repository.
-The branch should contain a single commit, with the appropriate commit message (see @ref occt_contribution_workflow_fix_commit "Requirements to the commit message" below).
+The branch should contain a single commit, with the appropriate commit message (see [Requirements to the commit message](#occt_contribution_workflow_fix_commit) below).
In general, this branch should be based on the recent version of the master branch.
It is highly preferable to submit changes basing on the current master.
In case if the fix is implemented on the previous release of OCCT, the branch can be based on the corresponding tag in Git, instead of the master.
The branch name should be composed of letters **CR** (abbreviation of "Change Request") followed by the issue ID number (without leading zeros).
-It is possible to add an optional suffix to the branch name after the issue ID, e.g. to distinguish between several versions of the fix (see @ref occt_contribution_nonstd_rebase).
+It is possible to add an optional suffix to the branch name after the issue ID, e.g. to distinguish between several versions of the fix (see [Link](#occt_contribution_nonstd_rebase)).
-See @ref occt_contribution__git_guide "Guide to using GIT" for help.
+See [Guide to using GIT](#occt_contribution__git_guide) for help.
-@note When a branch with the name given according to the above rule is pushed to Git, a note is automatically added to the corresponding issue in Mantis, indicating the person who has made the push, the commit hash, and (for new commits) the description.
+> **Note:** When a branch with the name given according to the above rule is pushed to Git, a note is automatically added to the corresponding issue in Mantis, indicating the person who has made the push, the commit hash, and (for new commits) the description.
-@subsubsection occt_contribution_workflow_fix_commit Requirements to the commit message
+
The commit message posted in Git constitutes an integral part of both the fix and the release documentation.
@@ -211,7 +211,7 @@ Example:
Provide sufficient context so that potential user of the affected functionality can understand what has been changed and how the algorithm works now.
Describe reason and essence of the changes made, but do not go too deep into implementation details -- these should be reflected in comments in the code.
-@subsubsection occt_contribution_workflow_fix_resolve Marking issue as resolved
+
To mark the change as ready for review and testing, the corresponding issue should be switched to **RESOLVED** state.
By default, the issue gets assigned to the **Maintainer** of the component, who is thus responsible for its review.
@@ -225,9 +225,9 @@ The possible variants are:
* N/A (Not required / Not possible / Not applicable);
* Reference to an issue in the bug tracker of another project.
-@subsection occt_contribution_workflow_review Code review
+
-The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT @ref occt_contribution__coding_rules "Coding Rules" and examines all changes in the sources, test case(s), and documentation to detect obvious and possible errors, misprints, or violations of the coding style.
+The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT [Coding Rules](#occt_contribution__coding_rules) and examines all changes in the sources, test case(s), and documentation to detect obvious and possible errors, misprints, or violations of the coding style.
If the Reviewer detects some problems, he can either:
@@ -242,12 +242,12 @@ If the Reviewer detects some problems, he can either:
If Reviewer does not detect any problems, or provides a corrected version, he changes status to **REVIEWED**.
The issue gets assigned to the **Bugmaster**.
-@subsection occt_contribution_workflow_test Testing
+
The issues that are in **REVIEWED** state are subject of certification (non-regression) testing.
The issue is assigned to an OCCT **Tester** when he starts processing it.
- If the branch submitted for testing is based on obsolete status of the master branch, **Tester** @ref occt_contribution_nonstd_rebase "rebases" it on master HEAD.
+ If the branch submitted for testing is based on obsolete status of the master branch, **Tester** [rebases](#occt_contribution_nonstd_rebase) it on master HEAD.
In case of conflicts, the issue is assigned back to **Developer** in **FEEDBACK** status, requesting for a rebase.
Certification testing includes:
@@ -264,9 +264,9 @@ If the **Tester** does not detect problems or regressions, he changes the status
If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problems.
The **Developer** should analyze the reported problems and, depending on results of this analysis, either:
* Confirm that the detected problems are expected changes and they should be accepted as a new status of the code. Then the issue should be switched to **FEEDBACK** and assigned to the **Bugmaster**.
-* Produce a new solution (see @ref occt_contribution_workflow_fix, and also @ref occt_contribution_nonstd_minor).
+* Produce a new solution (see [Link](#occt_contribution_workflow_fix), and also [Link](#occt_contribution_nonstd_minor)).
-@subsection occt_contribution_workflow_integrate Integration of a solution
+
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
* the change has been reviewed;
@@ -281,7 +281,7 @@ Each change is integrated as a single commit without preserving the history of c
This is done to have the master branch history plain and clean.
The following picture illustrates the process:
-@figure{OCCT_ContributionWorkflow_V3_image002.png,"Integration of several branches",420}
+
The new integration branch is tested against possible regressions that might appear due to interference between separate changes.
When the tests are OK, the integration branch is pushed as the new master to the official repository.
@@ -289,12 +289,12 @@ The issue status is set then to **VERIFIED** and is assigned to the **Reporter**
The branches corresponding to the integrated fixes are removed from the repository by the **Bugmaster**.
-@subsection occt_contribution_workflow_close Closing an issue
+
When possible, the **Reporter** should check whether the problem is actually resolved in the environment where it has been discovered, after the fix is integrated to master.
If the fix does not actually resolve the original problem, the issue in **VERIFIED** status can be reopened and assigned back to the **Developer** for rework.
The details on how to check that the issue is still reproducible should be provided.
-However, if the issue does resolve the problem as described in the original report, but a similar problem is discovered for another input data or configuration, or the fix has caused a regression, that problem should be registered as a separate (@ref occt_contribution_nonstd_relate "related") issue.
+However, if the issue does resolve the problem as described in the original report, but a similar problem is discovered for another input data or configuration, or the fix has caused a regression, that problem should be registered as a separate ([related](#occt_contribution_nonstd_relate)) issue.
If the fix integrated to master causes regressions, **Bugmaster** can revert it and reopen the issue.
@@ -303,19 +303,19 @@ The final issue state is **CLOSED**.
The field **Fixed in Version** of the issue is set to the OCCT version where it is fixed.
-@section occt_contribution_nonstd Additional workflow elements
+
-@subsection occt_contribution_nonstd_feedback Requesting more information or specific action
+
If, at any step of the issue lifetime, the person responsible for it cannot process it due to absence of required information, expertise, or rights, he can switch it to status **FEEDBACK** and assign to the person who is (presumably) able to resolve the block. Some examples of typical situations where **FEEDBACK** is used are:
* The **Maintainer** or the **Developer** requests for more information from the **Reporter** to reproduce the issue;
* The **Tester** requests the **Developer** or the **Maintainer** to help him in the interpretation of testing results;
-* The **Developer** or the **Maintainer** asks the **Bugmaster** to close the issue that is found irrelevant or already fixed (see @ref occt_contribution_nonstd_autofix).
+* The **Developer** or the **Maintainer** asks the **Bugmaster** to close the issue that is found irrelevant or already fixed (see [Link](#occt_contribution_nonstd_autofix)).
In general, issues with status **FEEDBACK** should be processed as fast as possible, to avoid unjustified delays.
-@subsection occt_contribution_nonstd_relate Defining relationships between issues
+
When two or more issues are related to each other, this relationship should be reflected in the issue tracker.
It is also highly recommended to add a note to explain the relationship.
@@ -328,14 +328,15 @@ Typical cases of relationships are:
When the fix made for one issue also resolves another one, these issues should be marked as related or duplicate.
In general, the duplicate issue should have the same status, and, when closed, be marked as fixed in the same OCCT version, as the main one.
-@subsection occt_contribution_nonstd_patch Submission of a change as a patch
+
+
In some cases (if Git is not accessible for the contributor), external contributions can be submitted as a patch file (generated by *diff* command) or as modified sources attached to the Mantis issue.
The OCCT version, for which the patch is generated, should be clearly specified (e.g. as hash code of Git commit if the patch is based on an intermediate state of the master).
-@note Such contributions should be put to Git by someone else (e.g. the **Reviewer**), this may cause delay in their processing.
+> **Note:** Such contributions should be put to Git by someone else (e.g. the **Reviewer**), this may cause delay in their processing.
-@subsection occt_contribution_nonstd_rebase Updating branches in Git
+
Updates of the existing branch (e.g. taking into account the remarks of the **Reviewer**, or fixing regressions) should be provided as new commits on top of previous state of the branch.
@@ -348,14 +349,14 @@ Usually it is worth keeping a non-squashed branch in Git for reference.
To avoid confusions, the branch corresponding to the latest version of the change should have a greater index.
-@note Make sure to revise the commit message after squashing a branch, to keep it meaningful and comprehensive.
+> **Note:** Make sure to revise the commit message after squashing a branch, to keep it meaningful and comprehensive.
-@subsection occt_contribution_nonstd_minor Minor corrections
+
In some cases review remarks or results of testing require only minor corrections to be done in the branch containing a change.
"Minor" implies that the correction does not impact the functionality and does not affect the description of the previously committed change.
-As an exception to general @ref occt_contribution_workflow_fix_git "single-commit rule", it is allowed to put such minor corrections on top of the existing branch as a separate commit, and re-submit it for further processing in the same branch, without squashing.
+As an exception to general [single-commit rule](#occt_contribution_workflow_fix_git), it is allowed to put such minor corrections on top of the existing branch as a separate commit, and re-submit it for further processing in the same branch, without squashing.
Minor commits should have a single-line message starting with #.
These messages will be ignored when the branch is squashed at integration.
@@ -367,7 +368,7 @@ Typical cases of minor corrections are:
* Addition or correction of comments or documentation;
* Corrections of code formatting (e.g. reversion of irrelevant formatting changes made in the main commit).
-@subsection occt_contribution_nonstd_autofix Handling non-reproducible issues
+
Investigation of each issue starts with reproducing it on current development version (master).
@@ -383,9 +384,9 @@ Otherwise, if the issue is fixed in one of previous releases, the **Bugmaster**
If the issue cannot be reproduced due to an unclear description, missing data, etc., it should be assigned back to the **Reporter** in **FEEDBACK** status, requesting for more information.
The **Reporter** should provide additional information within one month; after that time, if no new information is provided, the issue should be closed by the **Bugmaster** with resolution **Unable to reproduce**.
-@section occt_contribution_app Appendix: Issue attributes
+
-@subsection occt_contribution_app_category Category
+
The category corresponds to the component of OCCT where the issue is found:
@@ -410,7 +411,7 @@ The category corresponds to the component of OCCT where the issue is found:
| Website:Git | OCCT Git repository, git.dev.opencascade.org |
-@subsection occt_contribution_app_severity Severity
+
Severity shows at which extent the issue affects the product.
The list of used severities is given in the table below in the descending order.
@@ -428,7 +429,7 @@ The category corresponds to the component of OCCT where the issue is found:
| integration request | Requested integration of an existing feature into the product. |
| just a question | A question to be processed, without need of any changes in the product. |
-@subsection occt_contribution_app_status Status
+
The bug statuses that can be applied to the issues are listed in the table below.
@@ -445,7 +446,7 @@ The category corresponds to the component of OCCT where the issue is found:
| Verified | The fix has been integrated into the master of the corresponding repository |
| Closed + resolution | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
-@subsection occt_contribution_app_resolution Resolution
+
**Resolution** is set when the bug is closed. "Reopen" resolution is added automatically when the bug is reopened.
diff --git a/dox/user_guides/de_wrapper/de_wrapper.md b/dox/de_wrapper.md
similarity index 86%
rename from dox/user_guides/de_wrapper/de_wrapper.md
rename to dox/de_wrapper.md
index c915dcd786..17cb585d42 100644
--- a/dox/user_guides/de_wrapper/de_wrapper.md
+++ b/dox/de_wrapper.md
@@ -1,9 +1,6 @@
-Data Exchange Wrapper (DE_Wrapper) {#occt_user_guides__de_wrapper}
-============================
+# Data Exchange Wrapper (DE_Wrapper)
-@tableofcontents
-
-@section occt_de_wrapper_1 Introduction
+
This guide explains how to use the **Data Exchange Wrapper** (DE Wrapper).
It provides basic directions on setup, usage and file creation via DE_Wrapper.
@@ -12,7 +9,7 @@ The Data Exchange Wrapper (DE Wrapper) module allows reading and writing support
It is also possible to add support for new CAD formats by prototyping existing tools.
-The DE Wrapper component requires @ref occt_user_guides__xde "XDE" toolkit for operation.
+The DE Wrapper component requires [XDE](xde#occt_user_guides__xde) toolkit for operation.
This guide mainly explains how to convert CAD files to Open CASCADE Technology (OCCT) shapes and vice versa.
This guide principally deals with the following OCCT classes:
@@ -20,7 +17,7 @@ This guide principally deals with the following OCCT classes:
* The Configuration class, which contains all information for the transfer process, such as the units, tolerance, and all internal information for the OCC readers or writers.
* The wrapper class, which contains all loaded configuration objects with own CAD format, reads or writes CAD files in the format derived from file extension or contents and saves or loads configuration settings for loaded configuration objects.
-@section occt_de_wrapper_2 Supported CAD formats
+
| CAD format | Extensions | RW support | Thread Safety | Presentation | Package |
| :--------- | :--------- | :--------- | :----------- | :----------- | :------ |
@@ -38,37 +35,42 @@ This guide principally deals with the following OCCT classes:
* The format names in the first column match the FormatName values used for configuration nodes.
* The VendorName for all listed CAD formats is "OCC".
-@section occt_de_wrapper_3 DE Session Configuration
+
Any providers can have their own read/write parameters. The transfer process is set up using DE configuration nodes, which hold all relevant parameters. There are two ways to change the parameter values: directly from code or by an external resource file/string.
The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and specilal global parameters.
-@subsection occt_de_wrapper_3_1 Getting a DE session. Code sample
+
Working with a DE session requires a DE_Wrapper object to be loaded or created first.
Getting the global DE_Wrapping object:
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
~~~~
Creating a local DE_Wrapper:
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = new DE_Wrapper();
~~~~
It is recommended to create a local one-time copy to work with the session, if no global changes are intended.
+
~~~~{.cpp}
Handle(DE_Wrapper) aOneTimeSession = aSession->Copy();
~~~~
-@subsection occt_de_wrapper_3_2 Configuration resource
+
Configuration resource is an external file or string of the following format:
+
~~~~{.cpp}
global.priority.STEP : OCC DTK
global.general.length.unit : 1
provider.STEP.OCC.read.precision.val : 0.0001
~~~~
-@subsubsection occt_de_wrapper_3_2_1 Configuration resource: graph of scopes
+
+
* **global.** is a scope of global parameters
* **priority.** is a scope of priority to use vendors with their providers.
* **general.** is a scope of global configuration parameter values
@@ -82,7 +84,7 @@ provider.STEP.OCC.read.precision.val : 0.0001
* ". : " is a separator of key-value
* "..." parameter value, can't contain new line symbols.
-@subsubsection occt_de_wrapper_3_2_2 Loading configuration resources. Configuring DE Session
+
The resource should be loaded after the registration of all providers that should be configured. The resource only impacts registered parameters. To configure a new registered provider it is necessary to load the resource again. Parameters not present in the resource will remain unchanged.
@@ -92,9 +94,10 @@ There are two ways to check what parameters are available:
There are two options for loading a resource: recursive and global parameters only. Recursive is the default option to configure all global parameters (units, priority, enable status) and all registered providers. Non-recursive configures only global parameters and ignores all provider settings. This option is the best for updating provider priority.
-@subsubsection occt_de_wrapper_3_2_3 Loading configuration resources. Code sample
+
Configuring using a resource string:
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aString =
@@ -108,6 +111,7 @@ Configuring using a resource string:
}
~~~~
Configuring using a resource file:
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aPathToFile = "";
@@ -117,9 +121,10 @@ Configuring using a resource file:
Message::SendFail() << "Error: configuration is incorrect";
}
~~~~
-@subsubsection occt_de_wrapper_3_2_4 Loading configuration resources. DRAW sample
+
Configuring using a resource string:
+
~~~~{.cpp}
set conf "
global.priority.STEP : OCC
@@ -132,12 +137,13 @@ LoadConfiguration ${conf} -recursive on
~~~~
Configuring using a resource file:
+
~~~~{.cpp}
set pathToFile ""
LoadConfiguration ${pathToFile} -recursive on
~~~~
-@subsubsection occt_de_wrapper_3_2_5 Saving configuration resources. Dump of configuration DE Session
+
Saving the configuration of a DE Session involves dumping all parameters of registered providers.
If a parameter did not change during the session, its value remains as default.
@@ -146,9 +152,10 @@ There are two ways to save a resource: recursive and global parameters only. Rec
It is possible to filter what vendors or providers to save by providing the correct name of the vendor or provider.
-@subsubsection occt_de_wrapper_3_2_6 Saving configuration resources. Code sample
+
Dump to resource string. If the vendors list is empty, saves all vendors. If the providers list is empty, saves all providers of valid vendors.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TColStd_ListOfAsciiString aFormats;
@@ -159,6 +166,7 @@ Dump to resource string. If the vendors list is empty, saves all vendors. If the
TCollection_AsciiString aConf = aSession->aConf->Save(aIsRecursive, aFormats, aVendors);
~~~~
Configure using a resource file. If the vendors list is empty, saves all vendors. If the providers list is empty, saves all providers of valid vendors.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aPathToFile = "";
@@ -172,9 +180,10 @@ Configure using a resource file. If the vendors list is empty, saves all vendors
Message::SendFail() << "Error: configuration is not saved";
}
~~~~
-@subsubsection occt_de_wrapper_3_2_7 Saving configuration resources. DRAW sample
+
Dump configuration to string. If no list of vendors is passed or it is empty, all vendors are saved. If no providers list is passed or it is empty, all providers of valid vendors are saved.
+
~~~~{.cpp}
set vendors "OCC"
set format "STEP"
@@ -182,6 +191,7 @@ set dump_conf [DumpConfiguration -recursive on -format ${format} -vendor ${vendo
~~~~
Dump configuration to file. If no vendors list are set as an argument or it is empty, saves all vendors. If no providers list as argument or it is empty, saves all providers of valid vendors:
+
~~~~{.cpp}
set vendors "OCC"
set format "STEP"
@@ -189,28 +199,30 @@ set pathToFile ""
DumpConfiguration -path ${pathToFile} -recursive on -format ${format} -vendor ${vendors}
~~~~
-@subsection occt_de_wrapper_3_3 Registering providers
+
To transfer a CAD file using DE Wrapper, it is necessary to register a CAD provider.
The provider contains internal and global parameters that have default values in the creation stage.
All registered providers are set to the map with information about its vendor and kept as smart handles. Therefore, it is possible to change the values via handle from external code.
-@subsubsection occt_de_wrapper_3_3_1 Registering providers. Code sample
+
It is nesessary to register only one ConfigurationNode for all needed formats.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
Handle(DE_ConfigurationNode) aNode = new DESTEP_ConfigurationNode();
aSession->Bind(aNode);
~~~~
-@subsubsection occt_de_wrapper_3_3_2 Registering providers. DRAW Sample
+
Use DRAW with all providers registered by the following command:
+
~~~~{.cpp}
pload XDE
~~~~
-@subsubsection occt_de_wrapper_3_3_3 Realtime initialization. Code sample
+
It is possible to change a parameter from code using a smart pointer.
@@ -237,13 +249,13 @@ THE_STEP_NODE->InternalParameters.ReadName = false;
THE_STEP_NODE->InternalParameters.ReadProps = false;
~~~~
-@subsection occt_de_wrapper_3_4 Priority of Vendors
+
DE session is able to work with several vendors with the same supported CAD format. To choose the preferred vendor for each format, use a special priority list.
If the high priority vendor's provider is not supported, a transfer operation is needed (write/read), then the next vendor will be chosen.
-@subsubsection occt_de_wrapper_3_4_1 Priority of Vendors. Code sample
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
@@ -257,9 +269,10 @@ If the high priority vendor's provider is not supported, a transfer operation is
aSession->ChangePriority(aFormat, aVendors, aToDisable);
~~~~
-@subsubsection occt_de_wrapper_3_4_2 Priority of Vendors. DRAW Sample
+
It is recommended to disable recursion and update only global parameters.
+
~~~~{.cpp}
set conf "
global.priority.STEP : OCC DTK
@@ -267,15 +280,16 @@ global.priority.STEP : OCC DTK
LoadConfiguration ${conf} -recursive off
~~~~
-@section occt_de_wrapper_4 Transfer of CAD files
+
To transfer from a CAD file to OCC or from OCC to a CAD file, it is necessary to use a configured DE_Wrapper object. It can be local, one-time or global. Global configuration of DE_Wrapper propagates to all nodes via transfer. There are two options for transferring: using OCC shape or XCAF document. It is possible to work only with real path to/from the file. Streaming is not supported (yet).
The format of input/output file is automatically determined by its extension or contents.
-@subsection occt_de_wrapper_4_1 Transfer of CAD files. Code samples
+
Reading STEP file to Shape.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aPathToFile = "example.stp";
@@ -287,6 +301,7 @@ Reading STEP file to Shape.
~~~~
Writing Shape to STEP file.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aPathToFile = "example.stp";
@@ -298,6 +313,7 @@ Writing Shape to STEP file.
~~~~
Reading STEP file into XCAF document.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aPathToFile = "example.stp";
@@ -309,6 +325,7 @@ Reading STEP file into XCAF document.
~~~~
Writing XCAF document into STEP.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper();
TCollection_AsciiString aPathToFile = "example.stp";
@@ -319,33 +336,37 @@ Writing XCAF document into STEP.
}
~~~~
-@subsection occt_de_wrapper_4_2 Transfer of CAD files. DRAW samples
+
Reading a STEP file into a Shape.
+
~~~~{.cpp}
set fileName "sample.stp"
readfile shape ${fileName}
~~~~
Writing a Shape into STEP.
+
~~~~{.cpp}
set fileName "sample.stp"
writefile shape ${fileName}
~~~~
Reading STEP into XCAF document.
+
~~~~{.cpp}
set fileName "sample.stp"
ReadFile D ${fileName}
~~~~
Writing XCAF document into STEP.
+
~~~~{.cpp}
set fileName "sample.stp"
WriteFile D ${fileName}
~~~~
-@subsection occt_de_wrapper_4_3 Transfer using DE Provider. Code sample
+
It is possible to read and write CAD files directly from a special provider.
@@ -366,13 +387,14 @@ if (!aProvider->Write(...))
}
~~~~
-@subsection occt_de_wrapper_4_4 Temporary configuration via transfer
+
It is possible to change the configuration of only one transfer operation. To avoid changing parameters in a session, one-time clone of the session can be created and used for transfer. This way is recommended for use in multithreaded mode.
-@subsubsection occt_de_wrapper_4_4_1 Temporary configuration via transfer. Code sample
+
Code sample to configure via transfer.
+
~~~~{.cpp}
Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper()->Copy();
TCollection_AsciiString aString =
@@ -391,15 +413,17 @@ Code sample to configure via transfer.
}
~~~~
-@subsubsection occt_de_wrapper_4_4_2 Temporary configuration via transfer. DRAW sample
+
Code sample to configure via transfer within DRAW command.
+
~~~~{.cpp}
set fileName "sample.stp"
readfile S5 $filename -conf "global.general.length.unit : 1000 "
~~~~
Code sample to configure via transfer as variable.
+
~~~~{.cpp}
set fileName "sample.stp"
set conf "
diff --git a/dox/debug/debug.md b/dox/debug.md
similarity index 92%
rename from dox/debug/debug.md
rename to dox/debug.md
index b21551abb0..12205d7aa2 100644
--- a/dox/debug/debug.md
+++ b/dox/debug.md
@@ -1,13 +1,10 @@
-Debugging tools and hints {#occt__debug}
-=========================
+# Debugging tools and hints
-@tableofcontents
-
-@section occt_debug_intro Introduction
+
This manual describes facilities included in OCCT to support debugging, and provides some hints for more efficient debug.
-@section occt_debug_macro Compiler macro to enable extended debug messages
+
Many OCCT algorithms can produce extended debug messages, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc.
@@ -23,11 +20,11 @@ These messages can be enabled in the same way, by defining corresponding macro.
Note that some header files are modified when *OCCT_DEBUG* is enabled, hence binaries built with it enabled are not compatible with client code built without this option; this is not intended for production use.
-@section occt_debug_exceptions Calling JIT debugger on exception
+
On Windows platform when using Visual Studio compiler there is a possibility to start the debugger automatically if an exception is caught in a program running OCCT. For this, set environment variable *CSF_DEBUG* to any value. Note that this feature works only if you enable OCCT exception handler in your application by calling *OSD::SetSignal()*.
-@section occt_debug_bop Self-diagnostics in Boolean operations algorithm
+
In real-world applications modeling operations are often performed in a long sequence, while the user sees only the final result of the whole sequence. If the final result is wrong, the first debug step is to identify the offending operation to be debugged further. Boolean operation algorithm in OCCT provides a self-diagnostic feature which can help to do that step.
@@ -37,15 +34,15 @@ The diagnostic code checks validity of the input arguments and the result of eac
Note that this feature does not applicable for UWP build.
-@section occt_debug_call Functions for calling from debugger
+
Modern interactive debuggers provide the possibility to execute application code at a program break point. This feature can be used to analyse the temporary objects available only in the context of the debugged code. OCCT provides several global functions that can be used in this way.
Note that all these functions accept pointer to variable as void* to allow calling the function even when debugger does not recognize type equivalence or can not perform necessary type cast automatically. It is responsibility of the developer to provide the correct pointer. In general these functions are not guaranteed to work, thus use them with caution and at your own risk.
-@subsection occt_debug_call_draw Interacting with DRAW
+
-Open CASCADE Test Harness or @ref occt_user_guides__test_harness "DRAW" provides an extensive set of tools for inspection and analysis of OCCT shapes and geometric objects and is mostly used as environment for prototyping and debugging OCCT-based algorithms.
+Open CASCADE Test Harness or [DRAW](draw_test_harness#occt_user_guides__test_harness) provides an extensive set of tools for inspection and analysis of OCCT shapes and geometric objects and is mostly used as environment for prototyping and debugging OCCT-based algorithms.
In some cases the objects to be inspected are available in DRAW as results of DRAW commands. In other cases, however, it is necessary to inspect intermediate objects created by the debugged algorithm. To support this, DRAW provides a set of commands allowing the developer to store intermediate objects directly from the debugger stopped at some point during the program execution (usually at a breakpoint).
@@ -86,7 +83,7 @@ Sets the specified geometric object as a value of DRAW interpreter variable with
All these functions are defined in *TKDraw* toolkit and return a string indicating the result of execution.
-@subsection occt_debug_call_brep Saving and dumping shapes and geometric objects
+
The following functions are provided by *TKBRep* toolkit and can be used from debugger prompt:
@@ -137,13 +134,13 @@ Dump geometric object to cout.
- *theHandlePtr* -- a pointer to the geometric variable (Handle to *Geom_Geometry* or *Geom2d_Curve* or descendant) to be set.
-@section occt_debug_dump_json Dump OCCT objects into Json
+
Many OCCT classes may dump the current state into the stream. This stream contains the information about the class field into the field value/s.
It is possible to prepare recursive dump using corresponded macro for class fields. The depth of this recursion is defined by parameter of the dump.
The object defines What parameters should be presented in the Dump. The usual way is to dump all object fields.
-@subsection occt_debug_dump_json_object Implementation in object
+
Steps to prepare dump of the object into json:
@@ -167,7 +164,7 @@ The following macro are defined to cover the object parameters into json format:
| OCCT_DUMP_FIELD_VALUES_STRING | "field": ["value_1", ..., "value_n"]
| OCCT_DUMP_BASE_CLASS | "kind": { result of kind::DumpJson(...) } |
-@subsection occt_debug_dump_json_draw Using in DRAW
+
In DRAW, key '-dumpJson' is used to dump an object.
It is implemented in 'vaspect' and 'boundingbox' commands.
@@ -195,9 +192,9 @@ Json output for Bnd_OBB (using command 'bounding v -obb -dumpJson'):
}
~~~~
-@section occt_debug_vstudio Using Visual Studio debugger
+
-@subsection occt_debug_vstudio_command Command window
+
Visual Studio debugger provides the Command Window (can be activated from menu View / Other Windows / Command Window), which can be used to evaluate variables and expressions interactively in a debug session (see https://msdn.microsoft.com/en-us/library/c785s0kz.aspx). Note that the Immediate Window can also be used but it has some limitations, e.g. does not support aliases.
@@ -244,13 +241,13 @@ Note that aliases are stored in the Visual Studio user's preferences and it is s
Note that there is no guarantee that the call will succeed and will not affect the program execution, thus use this feature at your own risk. In particular, the commands interacting with window system (such as *axo*, *vinit*, etc.) are known to cause application crash when the program is built in 64-bit mode. To avoid this, it is recommended to prepare all necessary view windows in advance, and arrange these windows to avoid overlapping with the Visual Studio window, to ensure that they are visible during debug.
-@subsection occt_debug_vstudio_watch Customized display of variables content
+
Visual Studio provides a way to customize display of variables of different types in debugger windows (Watch, Autos, Locals, etc.).
In Visual Studio 2005-2010 the rules for this display are defined in file *autoexp.dat* located in subfolder *Common7\\Packages\\Debugger* of the Visual Studio installation folder (hint: the path to that folder is given in the corresponding environment variable, e.g. *VS100COMNTOOLS* for vc10). This file contains two sections: *AutoExpand* and *Visualizer*. The following rules can be added to these sections to provide more convenient display of some OCCT data types.
-### \[AutoExpand\] section
+### \[AutoExpand\] section
~~~~{.cpp}
; Open CASCADE classes
@@ -346,7 +343,7 @@ Handle_TCollection_HAsciiString {
In Visual Studio 2012 and later, visualizers can be put in a separate file in subdirectory *Visualizers*. See file *occt.natvis* for example.
-@section occt_debug_perf Performance measurement tools
+
It is recommended to use specialized performance analysis tools to profile OCCT and application code.
However, when such tools are not available or cannot be used for some reason, tools provided by OSD package can be used: low-level C functions and macros defined in *OSD_PerfMeter.h* and *OSD_PerfMeter* class.
@@ -364,12 +361,12 @@ In DRAW, use command *dperf* to print all performance statistics.
Note that performance counters are not thread-safe.
-@section occt_debug_sanitizers Use of compiler sanitizers
+
GCC and Clang compilers provide options for instrumenting the code with the tools intended for detection of run-time errors, called sanitizers.
This section provides some hints for using sanitizers for detecting possible errors in OCCT code.
-@subsection occt_debug_sanitizers_linux Linux
+
Example of configuration steps for Ubuntu:
@@ -413,6 +410,6 @@ Known problems (as of CLang 6.0) are:
- Software signals (access violation etc.) are not handled
- Heap memory usage always reports zero
-@subsection occt_debug_sanitizers_windows Windows
+
Though CLang toolset is available in Visual Studio 2015 and newer, sanitizer do not seem to be available out of the box (last tested with VS 2019 16.2.3).
diff --git a/dox/debug/occt.natvis b/dox/debug/occt.natvis
deleted file mode 100644
index fc46e6a823..0000000000
--- a/dox/debug/occt.natvis
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
- [{(float)x} {(float)y}]
-
-
-
-
- [{(float)cood.x} {(float)cood.y}]
-
-
- [{(float)x} {(float)y} {(float)z}]
-
-
-
-
- [{(float)coord.x} {(float)coord.y} {(float)coord.z}]
-
-
- [{v[0]} {v[1]}]
-
-
- [{v[0]} {v[1]} {v[2]}]
-
-
- [{v[0]} {v[1]} {v[2]} {v[3]}]
-
-
-
- [{(float)matrix[0][0]} {(float)matrix[0][1]}], [{(float)matrix[1][0]} {(float)matrix[1][1]}]
-
-
-
-
- - ((NCollection_Vec4<$T1>*)myMat)[0]
- - ((NCollection_Vec4<$T1>*)myMat)[1]
- - ((NCollection_Vec4<$T1>*)myMat)[2]
- - ((NCollection_Vec4<$T1>*)myMat)[3]
-
-
-
- NULL
- [cnt={entity->count}]
-
- *entity
-
-
-
- NULL
- {(void*)entity} [cnt={entity->count}]
-
- *((NCollection_Handle<$T1>::Ptr*)entity)->myPtr
-
-
-
- NULL
- {(void*)entity} [cnt={entity->count} {*entity}]
-
- (opencascade::handle<$T1>::element_type*)entity
-
-
-
- {mylength}: {mystring,s}
-
- - mystring,s8
-
-
-
- {myString.mylength}: {myString.mystring,s}
-
-
- {myLength}: {myString,s}
-
-
- {mylength}: {(wchar_t *)mystring,su}
-
-
- {myString.mylength}: {(wchar_t *)myString.mystring,su}
-
-
- TColStd_PackedMapOfInteger [{myExtent}]
-
-
- NCollection_Vector [{myLength}]
-
-
- myData->Length
- *($T1*)((char*)myData->DataPtr + $i * myItemSize)
-
-
- myLength
- *($T1*)((char*)myData->DataPtr + $i * myItemSize)
-
-
-
-
- NCollection_List [{myLength}]
-
-
- myLength
- myFirst
- myNext
- *($T1*)(sizeof(NCollection_ListNode) + ((char *)this))
-
-
-
-
- NCollection_Sequence [{mySize}]
-
-
- mySize
- myFirstItem
- myNext
- *($T1*)(sizeof(NCollection_SeqNode) + ((char *)this))
-
-
-
-
-
- VOID
-
- Center: [{(float)myCenter[0]} {(float)myCenter[1]}], hSize: [{(float)myHSize[0]} {(float)myHSize[1]}]
-
-
-
-
- VOID
-
- Center: [{(float)myCenter[0]} {(float)myCenter[1]} {(float)myCenter[2]}], hSize: [{(float)myHSize[0]} {(float)myHSize[1]} {(float)myHSize[2]}]
-
-
-
- NULL
- [:{myLabelNode->myTag}]
-
- *myLabelNode
-
-
-
- [:{myTag}]
-
- - * myBrother
- - * myFirstChild
- myFirstAttribute
-
-
-
- NULL
-
- [transaction={((TDF_Attribute*)entity)->myTransaction}]
-
-
-
- (TDF_Attribute*)entity
-
-
-
- [{myGlVerMajor}.{myGlVerMinor}]
-
-
-
-
- empty
- {{size = {myUpperBound - myLowerBound + 1}}}
-
- - myUpperBound - myLowerBound + 1
-
- myUpperBound - myLowerBound + 1
- (Standard_Integer*)(myStart) + myLowerBound
-
-
-
-
-
- empty
- {{size = {myUpperBound - myLowerBound + 1}}}
-
- - myUpperBound - myLowerBound + 1
-
- myUpperBound - myLowerBound + 1
- (Standard_Real*)(myStart) + myLowerBound
-
-
-
-
-
-
- empty
- extent = {(myUpperColumn-myLowerColumn+1) * (myUpperRow-myLowerRow+1)}
-
-
-
-
-
- {{current = {myValue}}}
-
-
- this
- (TColStd_ListNodeOfListOfInteger*)myNext
- this->myValue
-
-
-
-
-
- empty
-
- - (TColStd_ListNodeOfListOfInteger*)(myFirst)
-
-
-
-
- {{current = {myValue}}}
-
-
- this
- (TColStd_ListNodeOfListOfReal*)myNext
- this->myValue
-
-
-
-
-
- empty
-
- - (TColStd_ListNodeOfListOfReal*)(myFirst)
-
-
-
-
- empty
-
- - (BRep_ListNodeOfListOfCurveRepresentation*)(myFirst)
-
-
-
-
- {myOrient} {myTShape} loc={myLocation}
-
-
-
- subshapes={myShapes} flags={myFlags}
-
-
-
- {{{myIndex} {myParameter}}}
-
-
-
- edge={myEdge} orig={myOriginalEdge} pave1={myPave1} pave2={myPave2} extpaves={myExtPaves}
-
-
-
diff --git a/dox/contribution/documentation/documentation.md b/dox/documentation.md
similarity index 84%
rename from dox/contribution/documentation/documentation.md
rename to dox/documentation.md
index b7836d811b..f2bc72ea08 100644
--- a/dox/contribution/documentation/documentation.md
+++ b/dox/documentation.md
@@ -1,9 +1,6 @@
- Documentation System {#occt_contribution__documentation}
-======================
+# Documentation System
-@tableofcontents
-
-@section OCCT_DM_SECTION_1 Introduction
+
OCCT documentation is provided in several forms:
@@ -23,7 +20,7 @@ OCCT documentation is provided in several forms:
This document provides practical guidelines for generation and editing of OCCT user documentation.
-@section OCCT_DM_SECTION_2 Prerequisites
+
You need to have the following software installed to generate the documentation.
@@ -46,7 +43,7 @@ You can use *custom.bat* file to add necessary paths to the *PATH* variable.
Note that in the process of PDF generation MiKTeX may need some packages not installed by default.
We recommend setting option "Install missing packages on-the-fly" to "Ask me first" (default) during MiKTeX installation:
-@figure{/contribution/documentation/images/documentation_miktex.png,"",320}
+
Documentation Generation
-Run command *gendoc* from command prompt (located in `adm` directory) to generate OCCT documentation.
+Run command *gendoc* from command prompt (with OCCT directory as current one) to generate OCCT documentation.
The synopsis is:
gendoc \[-h\] {-refman|-overview} \[-html|-pdf|-chm\] \[-m=|-ug=\] \[-v\] \[-s=\] \[-mathjax=\]
@@ -107,18 +104,18 @@ To generate Reference Manual for Foundation Classes and Modeling Data modules on
> gendoc -refman -m=FoundationClasses,ModelingData,ModelingAlgorithms -s=local
~~~~
-@section OCCT_DM_SECTION_3 Documentation Conventions
+
This section contains information about file format conventions, directories structure, etc.
-@subsection OCCT_DM_SECTION_3_1 File Format
+
The format used for documentation is MarkDown with Doxygen extensions.
The MarkDown files have a *.md extension and are based on rules described in \ref OCCT_DM_SECTION_A section.
-@subsection OCCT_DM_SECTION_3_2 Directory Structure
+
-@figure{/contribution/documentation/images/documentation_folders.png,"",160}
+
Each document has its own folder if there are any images used in it. These images are stored in *images* subfolder.
@@ -127,16 +124,16 @@ If you want to use the same image for several documents, you can place it in *do
**Note**: To avoid incorrect image display, use a relative path to the image (starting from *dox* folder). For instance:
-@verbatim
-@figure{/contribution/documentation/images/documentation_test_image.svg,"",420}
-@endverbatim
+```
+
+```
The documentation is generated in subfolder *doc* :
* *html* -- a directory for generated HTML pages;
* *pdf* -- a directory for generated PDF files.
-@section OCCT_DM_SECTION_4 Adding a New Document
+
Place a new document in the folder taking into account its logical position in the documentation hierarchy. For instance, the document *svn.md* about the use of SVN to work with OCCT source code can be placed into /dox/contribution/.
@@ -146,15 +143,15 @@ If there are images in the document, it should be placed in its own folder conta
Add a relative path to *svn.md* in file dox/FILES.txt. For instance
-@verbatim
+```
contribution/svn/svn.md
-@endverbatim
+```
**Note** that the order of paths to documents in *FILES.txt* is reproduced in the Table of Contents in the HTML output, thus they need to be placed logically.
-**Note** that you should specify a file tag, not the document name. See @ref OCCT_DM_SECTION_A_1 "Header and hierarchic document structure" section for details.
+**Note** that you should specify a file tag, not the document name. See [Header and hierarchic document structure](#OCCT_DM_SECTION_A_1) section for details.
-@section OCCT_DOC_SECTION_5 Additional Resources
+
More information about OCCT can be found at http://www.opencascade.com and
http://dev.opencascade.org sites.
@@ -165,14 +162,13 @@ http://en.wikipedia.org/wiki/Help:Displaying_a_formula
More information on MarkDown and Doxygen syntax can be found at:
http://www.stack.nl/~dimitri/doxygen/manual
-@section OCCT_DM_SECTION_A Appendix 1: Document Syntax
+
A document file in *.md format must start with a proper header defining a caption and a unique tag.
-@verbatim
-Documentation System {#contribution__documentation}
-=====================
-@endverbatim
+```
+# Documentation System
+```
The document structure is formed by sections that must be defined consistently.
@@ -181,7 +177,7 @@ Any specific text elements can be introduced by Markdown language tags or by usu
The table of contents, page numbers (in PDF), and figure numbers (in PDF) are generated automatically.
-@subsection OCCT_DM_SECTION_A_1 Headers and hierarchic document structure
+
Headers of different levels can be specified with the following tags:
* \@section -- for the first-level headers;
@@ -190,11 +186,14 @@ Headers of different levels can be specified with the following tags:
For example:
-@verbatim
- @section occt_ocaf_1 Basic Concepts
- @subsection occt_ocaf_1_1 Applications and Documents
- @subsubsection occt_ocaf_1_1_1 The document and the data framework
-@endverbatim
+```
+
+
+
+
+
+
+```
**Note** that section names can be used for references within the document and in other documents, so it is necessary to use the common prefix indicative of the document name for all section names in the given document.
For example, *occt_ocaf* for sections in Open CASCADE Application Framework manual.
@@ -211,7 +210,7 @@ However, the fourth and fifth level headers can be tagged with #### and
It is also possible to use tags ## and ### for second and third level headers if you do not wish to show them in the table of contents or make references to them.
-@subsection OCCT_DM_SECTION_A_2 Plain Text
+
A plain text is organized in paragraphs, separated by empty lines in MarkDown source.
The length of lines is not restricted; it is recommended to put each sentence on a separate line -- this is optimal for easier comparison of different versions of the same document.
@@ -222,18 +221,18 @@ To emphasize a word or a group of words, wrap the text with one pair of asterisk
**Note** that if your emphasized text starts or ends with a special symbol, the asterisks may not work. Use explicit HTML tags \\ and \\ instead.
-@subsection OCCT_DM_SECTION_A_3 Lists
+
To create a bulleted list, start each line with a hyphen or an asterisk,
followed by a space. List items can be nested. This code:
-@verbatim
+```
* Bullet 1
* Bullet 2
- Bullet 2a
- Bullet 2b
* Bullet 3
-@endverbatim
+```
produces this list:
@@ -246,13 +245,13 @@ produces this list:
To create a numbered list, start each line with number and a period,
then a space. Numbered lists can also be nested. Thus this code
-@verbatim
+```
1. List item 1
1. Sub-item 1
2. Sub-item 2
2. List item 2
4. List item 3
-@endverbatim
+```
produces this list:
@@ -299,17 +298,17 @@ Example of a complex nested list:
2. List item 2
-@subsection OCCT_DM_SECTION_A_4 Tables
+
A table consists of a header line, a separator line, and at least one row line.
Table columns are separated by the pipe (|) character. The following example:
-@verbatim
+```
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
-@endverbatim
+```
will produce the following table:
@@ -320,12 +319,12 @@ Content Cell | Content Cell
Column alignment can be controlled via one or two colons at the header separator line:
-@verbatim
+```
| Right | Center | Left |
| ----: | :----: | :---- |
| 10 | 10 | 10 |
| 1000 | 1000 | 1000 |
-@endverbatim
+```
which will looks as follows:
@@ -336,7 +335,7 @@ which will looks as follows:
Note that each table row should be contained in one line of text; complex tables can be created using HTML tags.
-@subsection OCCT_DM_SECTION_A_5 Code Blocks
+
Paragraphs indented with 4 or more spaces are considered as code fragments and rendered using Courier font.
Example:
@@ -353,28 +352,28 @@ To highlight the code, the developer has to indicate the typical file extension,
which corresponds to the programming language, after the opening fence.
For highlighting according to the C++ language, for instance, write the following code (the curly braces and dot are optional):
-@verbatim
+```
~~~{.cpp}
int func(int a,int b) { return a*b; }
~~~
-@endverbatim
+```
which will produce:
~~~{.cpp}
int func(int a,int b) { return a*b; }
~~~
-Smaller code blocks can be inserted by wrapping with tags \@code and \@endcode.
+Smaller code blocks can be inserted by wrapping with tags \``` and \```.
Verbatim content (same as code but without syntax highlighting) can be inserted by wrapping with tags \@verbatim and \@endverbatim.
-@subsection OCCT_DM_SECTION_A_5a Quotes
+
Text quoted from other sources can be indented using ">" tag. For example:
-@verbatim
+```
> [Regression in 6.9.0] *IGES - Export of a reversed face leads to wrong data*
-@endverbatim
+```
will produce
@@ -383,25 +382,25 @@ will produce
Note that this tag should prefix each line of the quoted text.
Empty lines in the quoted text, if any, should not have trailing spaces after the ">" (lines with trailing spaces will break the quote block).
-@subsection OCCT_DM_SECTION_A_6 References
+
To insert a reference to a website, it is sufficient to write an URL.
For example: http://en.wikipedia.org
To insert a reference to a document or its subsection, use command \@ref followed by the document or section tag name.
-For instance, @code @ref OCCT_DM_SECTION_A @endcode will be rendered as @ref OCCT_DM_SECTION_A.
+For instance, ``` [Link](#OCCT_DM_SECTION_A) ``` will be rendered as [Link](#OCCT_DM_SECTION_A).
Note that links between documents will not work in PDF output if each document is generated independently.
Hence it is recommended to add a name of the referenced section after the tag name in the \@ref command (in quotes): this will guarantee that the reference is recognizable for the reader even if the cross-link is not instantiated.
-For instance: @code @ref occt_modat_1 "Geometry Utilities" @endcode will be rendered as @ref occt_modat_1 "Geometry Utilities".
+For instance: ``` [Geometry Utilities](#occt_modat_1) ``` will be rendered as [Geometry Utilities](#occt_modat_1).
-@subsection OCCT_DM_SECTION_A_7 Images
+
-For inserting images into the document use the command \@figure, as follows:
+For inserting images into the document use the HTML command img, as follows:
-@verbatim
- @figure{/relative/path/to/image/image_file_name.png,"Image caption"}
-@endverbatim
+```
+
+```
The first argument is a path to the image file, relative to the *dox* folder.
The supported formats for images are PNG, JPG, and SVG.
@@ -414,13 +413,13 @@ Captions are included below the image; in PDF output the images with caption are
Example:
-@verbatim
- @figure{/contribution/documentation/images/documentation_test_image.svg,"Test SVG image"}
-@endverbatim
+```
+
+```
is rendered as:
-@figure{/contribution/documentation/images/documentation_test_image.svg,"Test SVG image",320}
+
We recommend using **Inkscape** for creation and edition of vector graphics.
The graphics created in MS Word Draw and some other vector editors can be copy-pasted to Inkscape and saved as SVG images.
@@ -429,19 +428,19 @@ Note that the image that will be included in documentation is the whole page of
Note that the *figure* command is an alias to the standard Doxygen command *image* repeated twice: once for HTML and then for Latex output (used for PDF generation). Thus if HTML and PDF outputs should include different images or captions, command "image" can be used:
-@verbatim
+```
@image html /relative/path/to/image/occ_logo_for_html.png
@image latex /relative/path/to/image/occ_logo_for_pdf.png
-@endverbatim
+```
-@subsection OCCT_DM_SECTION_A_8 Table Of Contents
+
Use \@tableofcontents tag to get the table of contents at the beginning of the document.
Actually, it is not strictly necessary now because TreeView option for HTML is used.
The TOC in the PDF document will be generated automatically.
-@subsection OCCT_DM_SECTION_A_9 Formulas
+
Formulas within MarkDown documents can be defined using LaTeX syntax.
@@ -450,66 +449,63 @@ Equations can be written by several ways:
1.Unnumbered displayed formulas that are centered on a separate line.
These formulas should be put between \@f\[ and \@f\] tags. An example:
-@verbatim
-@f[
+```
+$$
|I_2|=\left| \int_{0}^T \psi(t)
- \left\{
+ \lbrace
u(a,t)-
\int_{\gamma(t)}^a
\frac{d\theta}{k(\theta,t)}
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
- \right\} dt
+ \rbrace dt
\right|
-@f]
-@endverbatim
+$$
+```
gives the following result:
- @f$
+$$
|I_2|=\left| \int_{0}^T \psi(t)
- \left\{
+ \lbrace
u(a,t)-
\int_{\gamma(t)}^a
\frac{d\theta}{k(\theta,t)}
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
- \right\} dt
+ \rbrace dt
\right|
- @f$
-
+$$
+
2.Formulas can also be put between @verbatim \begin{align} @endverbatim and @verbatim \end{align} @endverbatim tags.
For example:
-
-@verbatim
+```
+$$
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
-@endverbatim
-
+$$
+```
gives the following result:
-@latexonly
- \begin{align}
- \dot{x} & = \sigma(y-x) \\
- \dot{y} & = \rho x - y - xz \\
- \dot{z} & = -\beta z + xy
- \end{align}
-@endlatexonly
-@htmlonly
+$$
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
-@endhtmlonly
+$$
3.Inline formulas can be specified using this syntax:
-@verbatim
- @f$ \sqrt{3x-1}+(1+x)^2 @f$
-@endverbatim
+```
+$$
+\sqrt{3x-1}+(1+x)^2
+$$
+```
+that leads to the following result:
- that leads to the following result: @f$ \sqrt{3x-1}+(1+x)^2 @f$
-
+$$
+\sqrt{3x-1}+(1+x)^2
+$$
diff --git a/dox/samples/draw_scripts.md b/dox/draw_scripts.md
similarity index 94%
rename from dox/samples/draw_scripts.md
rename to dox/draw_scripts.md
index 786e8962c6..ec5eb733a1 100644
--- a/dox/samples/draw_scripts.md
+++ b/dox/draw_scripts.md
@@ -1,5 +1,4 @@
-Draw: Demo Scripts {#samples__draw_scripts}
-================
+# Draw: Demo Scripts
All demo scripts are provided with OCCT sources and locate in CASROOT/samples/tcl. To play around them please
follow the steps below:
@@ -26,7 +25,7 @@ Draw is a command interpreter based on TCL and a graphical system used for testi
Draw can be used interactively to create, display and modify objects such as curves, surfaces and topological shapes.
-@figure{/introduction/images/overview_draw.png}
+
Scripts can be written to customize Draw and perform tests.
New types of objects and new commands can be added using C++ programming language.
@@ -55,10 +54,10 @@ Declaration of available plug-ins is done through special resource file(s).
The *pload* command loads the plug-in in accordance with
the specified resource file and activates the commands implemented in the plug-in.
-The whole process of using the plug-in mechanism as well as the instructions for extending Test Harness is described in the @ref occt_user_guides__test_harness.
+The whole process of using the plug-in mechanism as well as the instructions for extending Test Harness is described in the [Link](draw_test_harness#occt_user_guides__test_harness).
Draw Test Harness provides an environment for OCCT automated testing system.
-Check its @ref occt_contribution__tests "Automated Testing System" for details.
+Check its [Automated Testing System](tests#occt_contribution__tests) for details.
Remarks:
@@ -68,8 +67,7 @@ Remarks:
Experimenting with Draw Test Harness
------------------------------------
- Running Draw
-------------
+ ### Running Draw
**On Linux:**
diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/draw_test_harness.md
similarity index 87%
rename from dox/user_guides/draw_test_harness/draw_test_harness.md
rename to dox/draw_test_harness.md
index c1942e30cf..0eb2cee6ac 100644
--- a/dox/user_guides/draw_test_harness/draw_test_harness.md
+++ b/dox/draw_test_harness.md
@@ -1,14 +1,11 @@
-Draw Test Harness {#occt_user_guides__test_harness}
-===============================
-
-@tableofcontents
+# Draw Test Harness
-@section occt_draw_1 Introduction
+
This manual explains how to use Draw, the test harness for Open CASCADE Technology (**OCCT**).
Draw is a command interpreter based on TCL and a graphical system used to test and demonstrate Open CASCADE Technology modeling libraries.
-@subsection occt_draw_1_1 Overview
+
Draw is a test harness for Open CASCADE Technology. It provides a flexible and easy to use means of testing and demonstrating the OCCT modeling libraries.
@@ -35,7 +32,7 @@ There is also a set of commands for each delivery unit in the modeling libraries
* PRESENTATION.
-@subsection occt_draw_1_2 Contents of this documentation
+
This documentation describes:
@@ -48,7 +45,7 @@ This documentation describes:
* Data Exchange commands
* Shape Healing commands
-This document is a reference manual. It contains a full description of each command. All descriptions have the format illustrated below for the exit command.
+This document is a reference manual. It contains a full description of each command. All descriptions have the format illustrated below for the exit command.
~~~~{.php}
exit
@@ -56,7 +53,7 @@ exit
Terminates the Draw, TCL session. If the commands are read from a file using the source command, this will terminate the file.
-**Example:**
+**Example:**
~~~~{.php}
# this is a very short example
@@ -64,7 +61,7 @@ exit
~~~~
-@subsection occt_draw_1_3 Getting started
+
Install Draw and launch Emacs. Get a command line in Emacs using *Esc x* and key in *woksh*.
@@ -72,12 +69,12 @@ All DRAW Test Harness can be activated in the common executable called **DRAWEXE
Declaration of available plug-ins is done through the special resource file(s). The *pload* command loads the plug-in in accordance with the specified resource file and activates the commands implemented in the plug-in.
-@subsubsection occt_draw_1_3_1 Launching DRAW Test Harness
+
Test Harness executable *DRAWEXE* is located in the $CASROOT/\/bin directory (where \ is Win for Windows and Linux for Linux operating systems). Prior to launching it is important to make sure that the environment is correctly setup (usually this is done automatically after the installation process on Windows or after launching specific scripts on Linux).
-@subsubsection occt_draw_1_3_2 Plug-in resource file
+
Open CASCADE Technology is shipped with the DrawPlugin resource file located in the $CASROOT/src/DrawResources directory.
@@ -95,9 +92,9 @@ DCAF : TKDCAF
AISV : TKViewerTest
~~~~
-@subsubsection occt_draw_1_3_3 Activation of commands implemented in the plug-in
+
-To load a plug-in declared in the resource file and to activate the commands the following command must be used in Test Harness:
+To load a plug-in declared in the resource file and to activate the commands the following command must be used in Test Harness:
~~~~{.php}
pload [-PluginFileName] [[Key1] [Key2]...]
@@ -108,12 +105,12 @@ Where:
* -PluginFileName -- defines the name of a plug-in resource file (prefix "-" is mandatory) described above. If this parameter is omitted then the default name *DrawPlugin* is used.
* *Key* -- defines the key(s) enumerating plug-ins to be loaded. If no keys are specified then the key named *DEFAULT* is used (if there is no such key in the file then no plug-ins are loaded).
-According to the OCCT resource file management rules, to access the resource file the environment variable *CSF_PluginFileNameDefaults* (and optionally *CSF_PluginFileNameUserDefaults*) must be set and point to the directory storing the resource file. If it is omitted then the plug-in resource file will be searched in the $CASROOT/src/DrawResources directory.
+According to the OCCT resource file management rules, to access the resource file the environment variable *CSF_PluginFileNameDefaults* (and optionally *CSF_PluginFileNameUserDefaults*) must be set and point to the directory storing the resource file. If it is omitted then the plug-in resource file will be searched in the $CASROOT/src/DrawResources directory.
~~~~{.php}
Draw[] pload -DrawPlugin OCAF
~~~~
-This command will search the resource file *DrawPlugin* using variable *CSF_DrawPluginDefaults* (and *CSF_DrawPluginUserDefaults*) and will start with the OCAF key. Since the *DrawPlugin* is the file shipped with Open CASCADE Technology it will be found in the $CASROOT/src/DrawResources directory (unless this location is redefined by user's variables). The OCAF key will be recursively extracted into two toolkits/plug-ins: *TKDCAF* and *TKViewerTest* (e.g. on Windows they correspond to *TKDCAF.dll* and *TKViewerTest.dll*). Thus, commands implemented for Visualization and OCAF will be loaded and activated in Test Harness.
+This command will search the resource file *DrawPlugin* using variable *CSF_DrawPluginDefaults* (and *CSF_DrawPluginUserDefaults*) and will start with the OCAF key. Since the *DrawPlugin* is the file shipped with Open CASCADE Technology it will be found in the $CASROOT/src/DrawResources directory (unless this location is redefined by user's variables). The OCAF key will be recursively extracted into two toolkits/plug-ins: *TKDCAF* and *TKViewerTest* (e.g. on Windows they correspond to *TKDCAF.dll* and *TKViewerTest.dll*). Thus, commands implemented for Visualization and OCAF will be loaded and activated in Test Harness.
~~~~{.php}
Draw[] pload (equivalent to pload -DrawPlugin DEFAULT).
@@ -121,9 +118,9 @@ Draw[] pload (equivalent to pload -DrawPlugin DEFAULT).
This command will find the default DrawPlugin file and the DEFAULT key. The latter finally maps to the TKTopTest toolkit which implements basic modeling commands.
-@section occt_draw_2 The Command Language
+
-@subsection occt_draw_2_1 Overview
+
The command language used in Draw is Tcl. Tcl documentation such as "TCL and the TK Toolkit" by John K. Ousterhout (Addison-Wesley) will prove useful if you intend to use Draw extensively.
@@ -134,11 +131,11 @@ This chapter is designed to give you a short outline of both the TCL language an
* Control structures.
* Procedures.
-@subsection occt_draw_2_2 Syntax of TCL
+
TCL is an interpreted command language, not a structured language like C, Pascal, LISP or Basic. It uses a shell similar to that of csh. TCL is, however, easier to use than csh because control structures and procedures are easier to define. As well, because TCL does not assign a process to each command, it is faster than csh.
-The basic program for TCL is a script. A script consists of one or more commands. Commands are separated by new lines or semicolons.
+The basic program for TCL is a script. A script consists of one or more commands. Commands are separated by new lines or semicolons.
~~~~{.php}
set a 24
@@ -156,7 +153,8 @@ The following substitutions are performed by TCL:
Variable substitution is triggered by the $ character (as with csh), the content of the variable is substituted; { } may be used as in csh to enclose the name of the variable.
-**Example:**
+**Example:**
+
~~~~{.php}
# set a variable value
set file documentation
@@ -178,7 +176,8 @@ Command substitution is triggered by the [ ] characters. The brackets must enclo
Compare command construction in csh.
-**Example:**
+**Example:**
+
~~~~{.php}
set degree 30
set pi 3.14159265
@@ -192,7 +191,8 @@ TCL uses two forms of *quoting* to prevent substitution and word breaking.
Double quote *quoting* enables the definition of a string with space and tabs as a single word. Substitutions are still performed inside the inverted commas " ".
-**Example:**
+**Example:**
+
~~~~{.php}
# set msg to ;the price is 12.00;
set price 12.00
@@ -201,7 +201,8 @@ set msg ;the price is $price;
Braces *quoting* prevents all substitutions. Braces are also nested. The main use of braces is to defer evaluation when defining procedures and control structures. Braces are used for a clearer presentation of TCL scripts on several lines.
-**Example:**
+**Example:**
+
~~~~{.php}
set x 0
# this will loop for ever
@@ -224,7 +225,8 @@ set x [expr $x+1]
Comments start with a \# character as the first non-blank character in a command. To add a comment at the end of the line, the comment must be preceded by a semi-colon to end the preceding command.
-**Example:**
+**Example:**
+
~~~~{.php}
# This is a comment
set a 1 # this is not a comment
@@ -234,7 +236,8 @@ set b 1; # this is a comment
The number of words is never changed by substitution when parsing in TCL. For example, the result of a substitution is always a single word. This is different from csh but convenient as the behavior of the parser is more predictable. It may sometimes be necessary to force a second round of parsing. **eval** accomplishes this: it accepts several arguments, concatenates them and executes the resulting script.
-**Example:**
+**Example:**
+
~~~~{.php}
# I want to delete two files
@@ -248,7 +251,7 @@ exec rm $files
# a second evaluation will do it
~~~~
-@subsection occt_draw_2_3 Accessing variables in TCL and Draw
+
TCL variables have only string values. Note that even numeric values are stored as string literals, and computations using the **expr** command start by parsing the strings. Draw, however, requires variables with other kinds of values such as curves, surfaces or topological shapes.
@@ -260,7 +263,8 @@ There are many kinds of Draw variables, and new ones may be added with C++. Geom
Draw numeric variables can be used within an expression anywhere a Draw command requires a numeric value. The *expr* command is useless in this case as the variables are stored not as strings but as floating point values.
-**Example:**
+**Example:**
+
~~~~{.php}
# dset is used for numeric variables
# pi is a predefined Draw variable
@@ -269,7 +273,7 @@ point p radius*cos(angle) radius*sin(angle) 0
~~~~
It is recommended that you use TCL variables only for strings and Draw for numerals. That way, you will avoid the *expr* command. As a rule, Geometry and Topology require numbers but no strings.
-@subsubsection occt_draw_2_3_1 set, unset
+
Syntax:
@@ -284,7 +288,8 @@ Without a value, *set* returns the content of the variable.
*unset* deletes variables. It is also used to delete Draw variables.
-**Example:**
+**Example:**
+
~~~~{.php}
set a "Hello world"
set b "Goodbye"
@@ -297,7 +302,7 @@ set a
**Note**, that the *set* command can set only one variable, unlike the *dset* command.
-@subsubsection occt_draw_2_3_2 dset, dval
+
Syntax
@@ -311,7 +316,8 @@ dval name
*dval* evaluates an expression containing Draw numeric variables and returns the result as a string, even in the case of a single variable. This is not used in Draw commands as these usually interpret the expression. It is used for basic TCL commands expecting strings.
-**Example:**
+**Example:**
+
~~~~{.php}
# z is set to 0
dset x 10 y 15 z
@@ -327,9 +333,10 @@ puts ;x = [dval x], cos(x/pi) = [dval cos(x/pi)];
**Note,** that in TCL, parentheses are not considered to be special characters. Do not forget to quote an expression if it contains spaces in order to avoid parsing different words. (a + b) is parsed as three words: "(a + b)" or (a+b) are correct.
-@subsubsection occt_draw_2_3_3 del, dall
+
Syntax:
+
~~~~{.php}
del varname_pattern [varname_pattern ...]
dall
@@ -339,13 +346,14 @@ dall
*dall* command deletes all variables in the session.
-@subsection occt_draw_2_4 lists
+
TCL uses lists. A list is a string containing elements separated by spaces or tabs. If the string contains braces, the braced part accounts as one element.
This allows you to insert lists within lists.
-**Example:**
+**Example:**
+
~~~~{.php}
# a list of 3 strings
;a b c;
@@ -356,7 +364,7 @@ This allows you to insert lists within lists.
Many TCL commands return lists and **foreach** is a useful way to create loops on list elements.
-@subsubsection occt_draw_2_5 Control Structures
+
TCL allows looping using control structures. The control structures are implemented by commands and their syntax is very similar to that of their C counterparts (**if**, **while**, **switch**, etc.). In this case, there are two main differences between TCL and C:
@@ -364,9 +372,9 @@ TCL allows looping using control structures. The control structures are implemen
* You do not start the script on the next line of your command.
-@subsubsection occt_draw_2_5_1 if
+
-Syntax
+Syntax
~~~~{.php}
if condition script [elseif script .... else script]
@@ -376,7 +384,8 @@ if condition script [elseif script .... else script]
-**Example:**
+**Example:**
+
~~~~{.php}
if {$x > 0} {
puts ;positive;
@@ -387,11 +396,10 @@ puts ;negative;
}
~~~~
-@subsubsection occt_draw_2_5_2 while, for, foreach
+
Syntax:
-
~~~~{.php}
while condition script
for init condition reinit script
@@ -400,7 +408,8 @@ foreach varname list script
The three loop structures are similar to their C or csh equivalent. It is important to use braces to delay evaluation. **foreach** will assign the elements of the list to the variable before evaluating the script. \
-**Example:**
+**Example:**
+
~~~~{.php}
# while example
dset x 1.1
@@ -418,7 +427,7 @@ for {set i 0} {$i < 10} {incr i} {
foreach object {crapo tomson lucas} {display $object}
~~~~
-@subsubsection occt_draw_2_5_3 break, continue
+
Syntax:
@@ -431,7 +440,8 @@ Within loops, the **break** and **continue** commands have the same effect as in
**break** interrupts the innermost loop and **continue** jumps to the next iteration.
-**Example:**
+**Example:**
+
~~~~{.php}
# search the index for which t$i has value ;secret;
for {set i 1} {$i <= 100} {incr i} {
@@ -439,7 +449,7 @@ for {set i 1} {$i <= 100} {incr i} {
}
~~~~
-@subsection occt_draw_2_6 Procedures
+
TCL can be extended by defining procedures using the **proc** command, which sets up a context of local variables, binds arguments and executes a TCL script.
@@ -450,7 +460,7 @@ There are two means of accessing a variable outside the scope of the current pro
As TCL is not a strongly typed language it is very difficult to detect programming errors and debugging can be tedious. TCL procedures are, of course, not designed for large scale software development but for testing and simple command or interactive writing.
-@subsubsection occt_draw_2_6_1 proc
+
Syntax:
@@ -462,7 +472,8 @@ proc argumentlist script
**return** gives a return value to the procedure.
-**Example:**
+**Example:**
+
~~~~{.php}
# simple procedure
proc hello {} {
@@ -481,7 +492,7 @@ proc fact n {
~~~~
-@subsubsection occt_draw_2_6_2 global, upvar
+
Syntax:
@@ -497,7 +508,8 @@ upvar varname localname [varname localname ...]
**Note** that in the following examples the \$ character is always necessarily used to access the arguments.
-**Example:**
+**Example:**
+
~~~~{.php}
# convert degree to radian
# pi is a global variable
@@ -511,7 +523,7 @@ proc linang {linename x y angle} {
}
~~~~
-@section occt_draw_3 Basic Commands
+
This chapter describes all the commands defined in the basic Draw package. Some are TCL commands, but most of them have been formulated in Draw. These commands are found in all Draw applications. The commands are grouped into four sections:
@@ -523,7 +535,7 @@ This chapter describes all the commands defined in the basic Draw package. Some
Note that Draw also features a GUI task bar providing an alternative way to give certain general, graphic and display commands
-@subsection occt_draw_3_1 General commands
+
This section describes several useful commands:
@@ -534,7 +546,7 @@ This section describes several useful commands:
* **wait** to waste some time,
* **chrono** to time commands.
-@subsubsection occt_draw_3_1_1 help
+
Syntax:
@@ -548,13 +560,14 @@ Provides help or modifies the help information.
Specifying the command returns its syntax and in some cases, information on the command, The joker \* is automatically added at the end so that all completing commands are returned as well.
-**Example:**
+**Example:**
+
~~~~{.php}
# Gives help on all commands starting with *a*
~~~~
-@subsubsection occt_draw_3_1_2 source
+
Syntax:
@@ -565,7 +578,7 @@ Executes a file.
The **exit** command will terminate the file.
-@subsubsection occt_draw_3_1_3 spy
+
Syntax:
@@ -579,7 +592,8 @@ If a command returns an error it is saved with a comment mark.
The file created by **spy** can be executed with the **source** command.
-**Example:**
+**Example:**
+
~~~~{.php}
# all commands will be saved in the file ;session;
spy session
@@ -589,7 +603,7 @@ spy
-@subsubsection occt_draw_3_1_4 cpulimit
+
Syntax:
@@ -599,26 +613,28 @@ cpulimit [nbseconds]
**cpulimit**limits a process after the number of seconds specified in nbseconds. It is used in tests to avoid infinite loops. **cpulimit** without arguments removes all existing limits.
-**Example:**
+**Example:**
+
~~~~{.php}
#limit cpu to one hour
cpulimit 3600
~~~~
-@subsubsection occt_draw_3_1_5 wait
+
Syntax:
+
~~~~{.php}
wait [nbseconds]
~~~~
-Suspends execution for the number of seconds specified in *nbseconds*. The default value is ten (10) seconds. This is a useful command for a slide show.
+Suspends execution for the number of seconds specified in *nbseconds*. The default value is ten (10) seconds. This is a useful command for a slide show.
~~~~{.php}
# You have ten seconds ...
wait
~~~~
-@subsubsection occt_draw_3_1_6 chrono
+
Syntax:
@@ -636,7 +652,8 @@ With arguments, **chrono** is used to manage activated chronometers. You can per
* display the current time (show).
* display the current time with specified text (output example - *COUNTER text: N*), command testdiff will compare such outputs between two test runs (counter).
-**Example:**
+**Example:**
+
~~~~{.php}
chrono
==Chronometers activated.
@@ -646,11 +663,12 @@ ptorus t 20 5
==CPU system time: 0 seconds
~~~~
-@subsection occt_draw_3_2 Variable management commands
+
-@subsubsection occt_draw_3_2_1 isdraw, directory
+
Syntax:
+
~~~~{.php}
isdraw varname
directory [pattern]
@@ -660,7 +678,8 @@ directory [pattern]
Use **directory** to return a list of all Draw global variables matching a pattern.
-**Example:**
+**Example:**
+
~~~~{.php}
set a 1
isdraw a
@@ -679,7 +698,7 @@ foreach var [directory *curve*] {unset $var}
~~~~
-@subsubsection occt_draw_3_2_2 whatis, dump
+
Syntax:
@@ -692,7 +711,8 @@ dump varname [varname ...]
**dump** returns a brief type description, the coordinates, and if need be, the parameters of a Draw variable.
-**Example:**
+**Example:**
+
~~~~{.php}
circle c 0 0 1 0 5
whatis c
@@ -711,9 +731,10 @@ Radius :5
**Note** The behavior of *whatis* on other variables (not Draw) is not excellent.
-@subsubsection occt_draw_3_2_3 renamevar, copy
+
Syntax:
+
~~~~{.php}
renamevar varname tovarname [varname tovarname ...]
copy varname tovarname [varname tovarname ...]
@@ -722,7 +743,8 @@ copy varname tovarname [varname tovarname ...]
* **renamevar** changes the name of a Draw variable. The original variable will no longer exist. Note that the content is not modified. Only the name is changed.
* **copy** creates a new variable with a copy of the content of an existing variable. The exact behavior of **copy** is type dependent; in the case of certain topological variables, the content may still be shared.
-**Example:**
+**Example:**
+
~~~~{.php}
circle c1 0 0 1 0 5
renamevar c1 c2
@@ -731,9 +753,10 @@ renamevar c1 c2
copy c2 c3
~~~~
-@subsubsection occt_draw_3_2_4 datadir, save, restore
+
Syntax:
+
~~~~{.php}
datadir [directory]
save variable [filename]
@@ -750,7 +773,8 @@ If the path starts with a dot (.) only the last directory name will be changed i
The exact content of the file is type-dependent. They are usually ASCII files and so, architecture independent.
-**Example:**
+**Example:**
+
~~~~{.php}
# note how TCL accesses shell environment variables
# using $env()
@@ -772,13 +796,13 @@ restore theBox
== theBox
~~~~
-@subsection occt_draw_3_3 User defined commands
+
*DrawTrSurf* provides commands to create and display a Draw **geometric** variable from a *Geom_Geometry* object and also get a *Geom_Geometry* object from a Draw geometric variable name.
*DBRep* provides commands to create and display a Draw **topological** variable from a *TopoDS_Shape* object and also get a *TopoDS_Shape* object from a Draw topological variable name.
-@subsubsection occt_draw_3_3_1 set
+
#### In DrawTrSurf package:
@@ -812,7 +836,7 @@ Handle(Geom2d_Circle) C1 = new Geom2d_Circle
DrawTrSurf::Set(char*, C1);
~~~~
-Example of *DBRep*
+Example of *DBRep*
~~~~{.php}
TopoDS_Solid B;
@@ -820,10 +844,10 @@ B = BRepPrimAPI_MakeBox (10,10,10);
DBRep::Set(char*,B);
~~~~
-@subsubsection occt_draw_3_3_2 get
+
#### In DrawTrSurf package:
-
+
~~~~{.php}
Handle(Geom_Geometry) Get(Standard_CString& Name) ;
~~~~
@@ -863,15 +887,16 @@ TopoDS_Solid B = DBRep::Get(argv[1]);
}
~~~~
-@section occt_draw_4 Graphic Commands
+
Graphic commands are used to manage the Draw graphic system. Draw provides a 2d and a 3d viewer with up to 30 views. Views are numbered and the index of the view is displayed in the window’s title. Objects are displayed in all 2d views or in all 3d views, depending on their type. 2d objects can only be viewed in 2d views while 3d objects -- only in 3d views correspondingly.
-@subsection occt_draw_4_1 Axonometric viewer
+
-@subsubsection occt_draw_4_1_1 view, delete
+
Syntax:
+
~~~~{.php}
view index type [X Y W H]
delete [index]
@@ -892,7 +917,8 @@ Type selects from the following range:
The index, the type, the current zoom are displayed in the window title .
-**Example:**
+**Example:**
+
~~~~{.php}
# this is the content of the mu4 procedure
proc mu4 {} {
@@ -906,7 +932,7 @@ view 4 AXON 728 450 400 400
See also: **axo, pers, top, bottom, left, right, front, back, mu4, v2d, av2d, smallview**
-@subsubsection occt_draw_4_1_2 axo, pers, top, ...
+
Syntax:
@@ -929,7 +955,7 @@ All these commands are procedures used to define standard screen layout. They de
See also: **view**, **delete**
-@subsubsection occt_draw_4_1_3 mu, md, 2dmu, 2dmd, zoom, 2dzoom
+
Syntax:
@@ -946,7 +972,8 @@ perform the same on one or all 2d views.
* **zoom** and **2dzoom** set the zoom factor to a value specified by you. The current zoom factor is always displayed in the window’s title bar. Zoom 20 represents a full screen view in a large window; zoom 10, a full screen view in a small one.
* **wzoom** (window zoom) allows you to select the area you want to zoom in on with the mouse. You will be prompted to give two of the corners of the area that you want to magnify and the rectangle so defined will occupy the window of the view.
-**Example:**
+**Example:**
+
~~~~{.php}
# set a zoom of 2.5
zoom 2.5
@@ -959,7 +986,7 @@ perform the same on one or all 2d views.
See also: **fit**, **2dfit**
-@subsubsection occt_draw_4_14 pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr
+
Syntax:
@@ -968,7 +995,8 @@ pu [index]
pd [index]
~~~~
-The p_ commands are used to pan. **pu** and **pd** pan up and down respectively; **pl** and **pr** pan to the left and to the right respectively. Each time the view is displaced by 40 pixels. When no index is given, all views will pan in the direction specified.
+The p_ commands are used to pan. **pu** and **pd** pan up and down respectively; **pl** and **pr** pan to the left and to the right respectively. Each time the view is displaced by 40 pixels. When no index is given, all views will pan in the direction specified.
+
~~~~{.php}
# you have selected one anonometric view
pu
@@ -981,7 +1009,7 @@ pu 3
See also: **fit**, **2dfit**
-@subsubsection occt_draw_4_1_5 fit, 2dfit
+
Syntax:
@@ -994,7 +1022,8 @@ fit [index]
When fitting all views a unique zoom is computed for all the views. All views are on the same scale.
-**Example:**
+**Example:**
+
~~~~{.php}
# fit only view 1
fit 1
@@ -1004,7 +1033,7 @@ fit 1
See also: **zoom**, **mu**, **pu**
-@subsubsection occt_draw_4_1_6 u, d, l, r
+
Syntax:
@@ -1017,15 +1046,17 @@ r [index]
**u**, **d**, **l**, **r** Rotate the object in view around its axis by five degrees up, down, left or right respectively. This command is restricted to axonometric and perspective views.
-**Example:**
+**Example:**
+
~~~~{.php}
# rotate the view up
u
~~~~
-@subsubsection occt_draw_4_1_7 focal, fu, fd
+
Syntax:
+
~~~~{.php}
focal [f]
fu [index]
@@ -1035,7 +1066,8 @@ fd [index]
* **focal** changes the vantage point in perspective views. A low f value increases the perspective effect; a high one give a perspective similar to that of an axonometric view. The default value is 500.
* **fu** and **fd** increase or decrease the focal value by 10%. **fd** makes the eye closer to the object.
-**Example:**
+**Example:**
+
~~~~{.php}
pers
repeat 10 fd
@@ -1045,7 +1077,7 @@ repeat 10 fd
See also: **pers**
-@subsubsection occt_draw_4_1_8 color
+
Syntax:
@@ -1057,7 +1089,8 @@ color index name
The default values are: 0 White, 1 Red, 2 Green, 3 Blue, 4 Cyan, 5 Gold, 6 Magenta, 7 Marron, 8 Orange, 9 Pink, 10 Salmon, 11 Violet, 12 Yellow, 13 Khaki, 14 Coral.
-**Example:**
+**Example:**
+
~~~~{.php}
# change the value of blue
color 3 "navy blue"
@@ -1066,9 +1099,10 @@ color 3 "navy blue"
**Note** that the color change will be visible on the next redraw of the views, for example, after *fit* or *mu*, etc.
-@subsubsection occt_draw_4_1_9 dtext
+
Syntax:
+
~~~~{.php}
dtext [x y [z]] string
~~~~
@@ -1077,16 +1111,18 @@ dtext [x y [z]] string
The coordinates are real space coordinates.
-**Example:**
+**Example:**
+
~~~~{.php}
# mark the origins
dtext 0 0 bebop
dtext 0 0 0 bebop
~~~~
-@subsubsection occt_draw_4_1_10 hardcopy, hcolor, xwd
+
Syntax:
+
~~~~{.php}
hardcopy [index]
hcolor index width gray
@@ -1097,7 +1133,8 @@ xwd [index] filename
* **hcolor** lets you change the aspect of lines in the postscript file. It allows to specify a width and a gray level for one of the 16 colors. **width** is measured in points with default value as 1, **gray** is the gray level from 0 = black to 1 = white with default value as 0. All colors are bound to the default values at the beginning.
* **xwd** creates an X window xwd file from an active view. By default, the index is set to1. To visualize an xwd file, use the unix command **xwud**.
-**Example:**
+**Example:**
+
~~~~{.php}
# all blue lines (color 3)
# will be half-width and gray
@@ -1119,9 +1156,10 @@ Only use a postscript printer to print postscript files.
See also: **color**
-@subsubsection occt_draw_4_1_11 wclick, pick
+
Syntax:
+
~~~~{.php}
wclick
pick index X Y Z b [nowait]
@@ -1140,7 +1178,8 @@ This option is useful for tracking the pointer.
**Note** that the results are stored in Draw numeric variables.
-**Example:**
+**Example:**
+
~~~~{.php}
# make a circle at mouse location
pick index x y z b
@@ -1170,7 +1209,8 @@ The variable name "." (dot) has a special status in Draw. Any Draw command expec
* If the dot is an output argument, an unnamed object will be created. Of course this makes sense only for graphic objects: if you create an unnamed number you will not be able to access it. This feature is used when you want to create objects for display only.
* If you do not see what you expected while executing loops or sourcing files, use the **repaint** and **dflush** commands.
-**Example:**
+**Example:**
+
~~~~{.php}
# OK use dot to dump an object on the screen
dump .
@@ -1197,7 +1237,7 @@ renamevar . x
~~~~
-@subsubsection occt_draw_4_1_12 autodisplay
+
Syntax:
@@ -1209,7 +1249,8 @@ By default, Draw automatically displays any graphic object as soon as it is crea
When **autodisplay** is off, using the dot return argument is ineffective.
-**Example:**
+**Example:**
+
~~~~{.php}
# c is displayed
circle c 0 0 1 0 5
@@ -1223,9 +1264,10 @@ circle c 0 0 1 0 5
display c
~~~~
-@subsubsection occt_draw_4_1_13 display, donly
+
Syntax:
+
~~~~{.php}
display varname [varname ...]
donly varname [varname ...]
@@ -1234,7 +1276,8 @@ donly varname [varname ...]
* **display** makes objects visible.
* **donly** *display only* makes objects visible and erases all other objects. It is very useful to extract one object from a messy screen.
-**Example:**
+**Example:**
+
~~~~{.php}
\# to see all objects
foreach var [directory] {display $var}
@@ -1244,7 +1287,7 @@ donly . .
~~~~
-@subsubsection occt_draw_4_1_14 erase, clear, 2dclear
+
Syntax:
@@ -1259,7 +1302,8 @@ clear
**clear** erases only 3d objects and **2dclear** only 2d objects. **erase** without arguments is similar to **clear; 2dclear**.
-**Example:**
+**Example:**
+
~~~~{.php}
# erase eveerything with a name starting with c_
foreach var [directory c_*] {erase $var}
@@ -1268,16 +1312,16 @@ foreach var [directory c_*] {erase $var}
2dclear
~~~~
-@subsubsection occt_draw_4_1_14_1 disp, don, era
+
These commands have the same meaning as correspondingly display, donly and erase, but with the difference that they evaluate the arguments using glob pattern rules.
For example, to display all objects with names d_1, d_2, d_3, etc. it is enough to run the command:
+
~~~~{.php}
disp d_*
~~~~
-@subsubsection occt_draw_4_1_15 repaint, dflush
-
+
Syntax:
@@ -1295,26 +1339,27 @@ When an object is modified or erased, the whole view must be repainted. To avoid
Graphic operations are buffered by Draw (and also by the X system). Usually the buffer is flushed at the end of a command and before graphic selection. If you want to flush the buffer from inside a script, use the **dflush** command.
-See also: @ref occt_draw_4_1_11 "pick" command.
+See also: [pick](#occt_draw_4_1_11) command.
-@subsection occt_draw_4_2 AIS viewer -- view commands
+
-@subsubsection occt_draw_4_2_1 vinit
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vinit
-@subsubsection occt_draw_4_2_2 vhelp
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vhelp
-@subsubsection occt_draw_4_2_3 vtop
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vtop
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1323,12 +1368,13 @@ vfit
vtop
~~~~
-@subsubsection occt_draw_4_2_4 vaxo
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vaxo
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1337,77 +1383,78 @@ vfit
vaxo
~~~~
-@subsubsection occt_draw_4_2_5 vbackground
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vbackground
-@subsubsection occt_draw_4_2_6 vclear
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vclear
-@subsubsection occt_draw_4_2_7 vrepaint
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vrepaint
-@subsubsection occt_draw_4_2_8 vfit
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vfit
-@subsubsection occt_draw_4_2_9 vzfit
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vzfit
-@subsubsection occt_draw_4_2_10 vreadpixel
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vreadpixel
-@subsubsection occt_draw_4_2_11 vselect
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vselect
-@subsubsection occt_draw_4_2_12 vmoveto
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vmoveto
-@subsubsection occt_draw_4_2_13 vviewparams
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vviewparams
-@subsubsection occt_draw_4_2_14 vchangeselected
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vchangeselected
-@subsubsection occt_draw_4_2_16 vnbselected
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vnbselected
-@subsubsection occt_draw_4_2_19 vhlr
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vhlr
-@subsubsection occt_draw_4_2_20 vhlrtype
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vhlrtype
-@subsubsection occt_draw_4_2_21 vcamera
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vcamera
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1416,12 +1463,13 @@ vfit
vcamera -persp
~~~~
-@subsubsection occt_draw_4_2_22 vstereo
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vstereo
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1433,14 +1481,15 @@ vcamera -lefteye
vcamera -righteye
~~~~
-@subsection occt_draw_4_3 AIS viewer -- display commands
+
-@subsubsection occt_draw_4_3_1 vdisplay
+
Syntax:
@snippet ViewerTest.cxx vdisplay
**Example:**
+
~~~~{.php}
vinit
box b 40 40 40 10 10 10
@@ -1449,12 +1498,13 @@ vdisplay s b
vfit
~~~~
-@subsubsection occt_draw_4_3_2 vdonly
+
Syntax:
@snippet ViewerTest.cxx vdonly
**Example:**
+
~~~~{.php}
vinit
box b 40 40 40 10 10 10
@@ -1463,12 +1513,13 @@ vdonly b
vfit
~~~~
-@subsubsection occt_draw_4_3_3 vdisplayall
+
Syntax:
@snippet ViewerTest.cxx vdisplayall
**Example:**
+
~~~~{.php}
vinit
box b 40 40 40 10 10 10
@@ -1477,12 +1528,13 @@ vdisplayall
vfit
~~~~
-@subsubsection occt_draw_4_3_4 verase
+
Syntax:
@snippet ViewerTest.cxx verase
**Example:**
+
~~~~{.php}
vinit
box b1 40 40 40 10 10 10
@@ -1496,12 +1548,13 @@ verase b1
verase
~~~~
-@subsubsection occt_draw_4_3_5 veraseall
+
Syntax:
@snippet ViewerTest.cxx veraseall
**Example:**
+
~~~~{.php}
vinit
box b1 40 40 40 10 10 10
@@ -1515,12 +1568,13 @@ verase b1
verseall
~~~~
-@subsubsection occt_draw_4_3_6 vsetdispmode
+
Syntax:
@snippet ViewerTest.cxx vsetdispmode
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1529,27 +1583,28 @@ vsetdispmode 1
vfit
~~~~
-@subsubsection occt_draw_4_3_7 vdisplaytype
+
Syntax:
@snippet ViewerTest.cxx vdisplaytype
-@subsubsection occt_draw_4_3_8 verasetype
+
Syntax:
@snippet ViewerTest.cxx verasetype
-@subsubsection occt_draw_4_3_9 vtypes
+
Syntax:
@snippet ViewerTest.cxx vtypes
-@subsubsection occt_draw_4_3_10 vaspects
+
Syntax:
@snippet ViewerTest.cxx vaspects
Aliases:
+
~~~~{.php}
vsetcolor [-noupdate|-update] [name] ColorName
~~~~
@@ -1591,6 +1646,7 @@ Manages presentation properties (color, material, transparency) of all objects,
*STEELBLUE*, *STEELBLUE1*, *STEELBLUE2*, *STEELBLUE3*, *STEELBLUE4*, *TAN*, *TAN1*, *TAN2*, *TAN3*, *TAN4*, *THISTLE*, *THISTLE1*, *THISTLE2*, *THISTLE3*, *THISTLE4*, *TOMATO*, *TOMATO1*, *TOMATO2*, *TOMATO3*, *TOMATO4*,
*TURQUOISE*, *TURQUOISE1*, *TURQUOISE2*, *TURQUOISE3*, *TURQUOISE4*, *VIOLET*, *VIOLETRED*, *VIOLETRED1*, *VIOLETRED2*, *VIOLETRED3*, *VIOLETRED4*, *WHEAT*, *WHEAT1*, *WHEAT2*, *WHEAT3*, *WHEAT4*, *WHITE*, *WHITESMOKE*,
*YELLOW*, *YELLOW1*, *YELLOW2*, *YELLOW3*, *YELLOW4* and *YELLOWGREEN*.
+
~~~~{.php}
vaspects [name] [-setColor ColorName] [-setColor R G B] [-unsetColor]
vsetcolor [name] ColorName
@@ -1599,6 +1655,7 @@ vunsetcolor [name]
**Transparency** may be between 0.0 (opaque) and 1.0 (fully transparent).
**Warning**: at 1.0 the shape becomes invisible.
+
~~~~{.php}
vaspects [name] [-setTransparency Value] [-unsetTransparency]
vsettransparency [name] Value
@@ -1607,6 +1664,7 @@ vunsettransparency [name]
**Material** name can be *BRASS*, *BRONZE*, *COPPER*, *GOLD*, *PEWTER*, *PLASTER*, *PLASTIC*, *SILVER*, *STEEL*, *STONE*, *SHINY_PLASTIC*, *SATIN*,
*METALIZED*, *NEON_GNC*, *CHROME*, *ALUMINIUM*, *OBSIDIAN*, *NEON_PHC*, *JADE*, *WATER*, *GLASS*, *DIAMOND* or *CHARCOAL*.
+
~~~~{.php}
vaspects [name] [-setMaterial MaterialName] [-unsetMaterial]
vsetmaterial [name] MaterialName
@@ -1614,6 +1672,7 @@ vunsetmaterial [name]
~~~~
**Line width** specifies width of the edges. The width value may be between 0.0 and 10.0.
+
~~~~{.php}
vaspects [name] [-setWidth LineWidth] [-unsetWidth]
vsetwidth [name] LineWidth
@@ -1621,6 +1680,7 @@ vunsetwidth [name]
~~~~
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1632,12 +1692,13 @@ vaspects -setColor red -setTransparency 0.2
vrotate 10 10 10
~~~~
-@subsubsection occt_draw_4_3_11 vsetshading
+
Syntax:
@snippet ViewerTest.cxx vsetshading
-**Example:**
+**Example:**
+
~~~~{.php}
vinit
psphere s 20
@@ -1647,27 +1708,28 @@ vsetdispmode 1
vsetshading s 0.005
~~~~
-@subsubsection occt_draw_4_3_12 vunsetshading
+
Syntax:
@snippet ViewerTest.cxx vunsetshading
-@subsubsection occt_draw_4_3_15 vdump
+
Syntax:
@snippet ViewerTest.cxx vdump
-@subsubsection occt_draw_4_3_16 vdir
+
Syntax:
@snippet ViewerTest.cxx vdir
-@subsubsection occt_draw_4_3_17 vsub
+
Syntax:
@snippet ViewerTest.cxx vsub
-**Example:**
+**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1678,32 +1740,33 @@ vsetdispmode 1
vsub b 1
~~~~
-@subsubsection occt_draw_4_3_20 vsensdis
+
Syntax:
@snippet ViewerTest.cxx vsensdis
-@subsubsection occt_draw_4_3_21 vsensera
+
Syntax:
@snippet ViewerTest.cxx vsensera
-@subsubsection occt_draw_4_3_24 vstate
+
Syntax:
@snippet ViewerTest.cxx vstate
-@subsubsection occt_draw_4_3_25 vraytrace
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vraytrace
-@subsubsection occt_draw_4_3_26 vrenderparams
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vrenderparams
**Example:**
+
~~~~{.php}
vinit
box b 10 10 10
@@ -1712,19 +1775,20 @@ vfit
vraytrace 1
vrenderparams -shadows 1 -reflections 1 -fsaa 1
~~~~
-@subsubsection occt_draw_4_3_27 vshader
+
Syntax:
@snippet ViewerTest_OpenGlCommands.cxx vshader
-@subsection occt_draw_4_4 AIS viewer -- object commands
+
-@subsubsection occt_draw_4_4_1 vtrihedron
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vtrihedron
-**Example:**
+**Example:**
+
~~~~{.php}
vinit
vtrihedron tr1
@@ -1735,17 +1799,18 @@ vtrihedron t2 -color YAxis Quantity_NOC_GREEN
vtrihedron t2 -color ZAxis|Origin Quantity_NOC_BLUE1
~~~~
-@subsubsection occt_draw_4_4_2 vplanetri
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vplanetri
-@subsubsection occt_draw_4_4_3 vsize
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vsize
-**Example:**
+**Example:**
+
~~~~{.php}
vinit
vtrihedron tr1
@@ -1753,45 +1818,48 @@ vtrihedron tr2 0 0 0 1 0 0 1 0 0
vsize tr2 400
~~~~
-@subsubsection occt_draw_4_4_4 vaxis
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vaxis
-**Example:**
+**Example:**
+
~~~~{.php}
vinit
vtrihedron tr
vaxis axe1 0 0 0 1 0 0
~~~~
-@subsubsection occt_draw_4_4_5 vaxispara
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vaxispara
-@subsubsection occt_draw_4_4_6 vaxisortho
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vaxisortho
-@subsubsection occt_draw_4_4_7 vpoint
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vpoint
**Example:**
+
~~~~{.php}
vinit
vpoint p 0 0 0
~~~~
-@subsubsection occt_draw_4_4_8 vplane
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vplane
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 50 0
@@ -1800,22 +1868,23 @@ vtrihedron tr
vplane plane1 axe1 p1
~~~~
-@subsubsection occt_draw_4_4_9 vplanepara
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vplanepara
-@subsubsection occt_draw_4_4_10 vplaneortho
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vplaneortho
-@subsubsection occt_draw_4_4_11 vline
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vline
**Example:**
+
~~~~{.php}
vinit
vtrihedron tr
@@ -1825,12 +1894,13 @@ vline line1 p1 p2
vline line2 0 0 0 50 0 1
~~~~
-@subsubsection occt_draw_4_4_12 vcircle
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vcircle
**Example:**
+
~~~~{.php}
vinit
vtrihedron tr
@@ -1840,17 +1910,18 @@ vpoint p3 0 0 0
vcircle circle1 p1 p2 p3 1
~~~~
-@subsubsection occt_draw_4_4_13 vtri2d
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vtri2d
-@subsubsection occt_draw_4_4_14 vselmode
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vselmode
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1859,12 +1930,13 @@ vpoint p3 25 40 0
vtriangle triangle1 p1 p2 p3
~~~~
-@subsubsection occt_draw_4_4_15 vconnect
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vconnect
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1875,12 +1947,13 @@ vdisplay obj
vconnect new obj 100100100 1 0 0 0 0 1
~~~~
-@subsubsection occt_draw_4_4_16 vtriangle
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vtriangle
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1889,12 +1962,13 @@ vpoint p3 25 40 0
vtriangle triangle1 p1 p2 p3
~~~~
-@subsubsection occt_draw_4_4_17 vsegment
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vsegment
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1902,24 +1976,26 @@ vpoint p2 50 0 0
vsegment segment p1 p2
~~~~
-@subsubsection occt_draw_4_4_18 vpointcloud
+
Syntax:
@snippet ViewerTest_ObjectCommands.cxx vpointcloud
**Example:**
+
~~~~{.php}
vinit
vpointcloud pc 0 0 0 100 100000 surface -randColor
vfit
~~~~
-@subsubsection occt_draw_4_4_19 vclipplane
+
Syntax:
@snippet ViewerTest_ViewerCommands.cxx vclipplane
**Example:**
+
~~~~{.php}
vinit
vclipplane pln1 -equation 1 0 0 -0.1 -set Driver1/Viewer1/View1
@@ -1931,7 +2007,7 @@ vrotate 10 10 10
vselect 100 100
~~~~
-@subsubsection occt_draw_4_4_20 vdimension
+
Syntax:
@snippet ViewerTest_RelationCommands.cxx vdimension
@@ -1939,6 +2015,7 @@ Syntax:
**Attention:** length dimension can't be built without working plane.
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1953,12 +2030,13 @@ vdimension dim3 -radius -shapes circle
vfit
~~~~
-@subsubsection occt_draw_4_4_21 vdimparam
+
Syntax:
@snippet ViewerTest_RelationCommands.cxx vdimparam
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1970,12 +2048,13 @@ vdimparam dim1 -textvalue "w_1"
vdimparam dim1 -autovalue
~~~~
-@subsubsection occt_draw_4_4_22 vangleparam
+
Syntax:
@snippet ViewerTest_RelationCommands.cxx vangleparam
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -1986,12 +2065,13 @@ vfit
vangleparam dim1 -type exterior -showarrow first
~~~~
-@subsubsection occt_draw_4_4_23 vlengthparam
+
Syntax:
@snippet ViewerTest_RelationCommands.cxx vlengthparam
**Example:**
+
~~~~{.php}
vinit
vpoint p1 20 20 0
@@ -2003,12 +2083,13 @@ vzoom 0.5
vlengthparam dim1 -direction ox
~~~~
-@subsubsection occt_draw_4_4_24 vmovedim
+
Syntax:
@snippet ViewerTest_RelationCommands.cxx vmovedim
**Example:**
+
~~~~{.php}
vinit
vpoint p1 0 0 0
@@ -2017,7 +2098,7 @@ vdimension dim1 -length -plane xoy -shapes p1 p2
vmovedim dim1 -10 30 0
~~~~
-@subsubsection occt_draw_4_4_25 vtexture
+
Syntax:
@snippet ViewerTest.cxx vtexture
@@ -2026,13 +2107,14 @@ Texture mapping allows you to map textures on a shape.
Textures are texture image files and several are predefined.
You can control the number of occurrences of the texture on a face, the position of a texture and the scale factor of the texture.
-@subsection occt_draw_4_5 AIS viewer -- Mesh Visualization Service
+
**MeshVS** (Mesh Visualization Service) component provides flexible means of displaying meshes with associated pre- and post- processor data.
-@subsubsection occt_draw_4_5_1 meshfromstl
+
Syntax:
+
~~~~{.php}
meshfromstl meshname file
~~~~
@@ -2040,13 +2122,15 @@ meshfromstl meshname file
Creates a *MeshVS_Mesh* object based on STL file data. The object will be displayed immediately.
**Example:**
+
~~~~{.php}
meshfromstl mesh myfile.stl
~~~~
-@subsubsection occt_draw_4_5_2 vsetdispmode
+
Syntax:
+
~~~~{.php}
vsetdispmode meshname displaymode
~~~~
@@ -2057,15 +2141,17 @@ Changes the display mode of object **meshname**. The **displaymode** is integer
* *3* for *shrink* mode.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
vsetdispmode mesh 2
~~~~
-@subsubsection occt_draw_4_5_3 vselmode
+
Syntax:
+
~~~~{.php}
vselmode meshname selectionmode {on|off}
~~~~
@@ -2081,15 +2167,17 @@ The *selectionmode* is integer OR-combination of mode flags (`MeshVS_SelectionMo
* *256* -- groups (not supported in STL).
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
vselmode mesh 1
~~~~
-@subsubsection occt_draw_4_5_4 meshshadcolor
+
Syntax:
+
~~~~{.php}
meshshadcolor meshname red green blue
~~~~
@@ -2097,15 +2185,17 @@ meshshadcolor meshname red green blue
Changes the face interior color of object **meshname**. The *red*, *green* and *blue* are real values between *0* and *1*.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
meshshadcolormode mesh 0.5 0.5 0.5
~~~~
-@subsubsection occt_draw_4_5_5 meshlinkcolor
+
Syntax:
+
~~~~{.php}
meshlinkcolor meshname red green blue
~~~~
@@ -2113,15 +2203,17 @@ meshlinkcolor meshname red green blue
Changes the color of face borders for object **meshname**. The *red*, *green* and *blue* are real values between *0* and *1*.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
meshlinkcolormode mesh 0.5 0.5 0.5
~~~~
-@subsubsection occt_draw_4_5_6 meshmat
+
Syntax:
+
~~~~{.php}
meshmat meshname material [transparency]
~~~~
@@ -2150,15 +2242,17 @@ Changes the material of object **meshname**.
* *18 -- JADE*.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
meshmat mesh 18
~~~~
-@subsubsection occt_draw_4_5_7 meshshrcoef
+
Syntax:
+
~~~~{.php}
meshshrcoef meshname shrinkcoefficient
~~~~
@@ -2168,15 +2262,17 @@ In the shrink mode the face is shown as a congruent part of a usual face, so tha
The *shrinkcoefficient* is a positive real number.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
meshshrcoef mesh 0.05
~~~~
-@subsubsection occt_draw_4_5_8 meshshow
+
Syntax:
+
~~~~{.php}
meshshow meshname
~~~~
@@ -2184,16 +2280,18 @@ meshshow meshname
Displays **meshname** in the viewer (if it is erased).
The same as calling `vdisplay`.
-**Example:**
+**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
meshshow mesh
~~~~
-@subsubsection occt_draw_4_5_9 meshhide
+
Syntax:
+
~~~~{.php}
meshhide meshname
~~~~
@@ -2202,42 +2300,47 @@ Hides **meshname** in the viewer.
The same as calling `verase`.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
meshhide mesh
~~~~
-@subsubsection occt_draw_4_5_10 meshhidesel
+
Syntax:
+
~~~~{.php}
meshhidesel meshname
~~~~
Hides only selected entities. The other part of **meshname** remains visible.
-@subsubsection occt_draw_4_5_11 meshshowsel
+
Syntax:
+
~~~~{.php}
meshshowsel meshname
~~~~
Shows only selected entities. The other part of **meshname** becomes invisible.
-@subsubsection occt_draw_4_5_12 meshshowall
+
Syntax:
+
~~~~{.php}
meshshowall meshname
~~~~
Changes the state of all entities to visible for **meshname**.
-@subsubsection occt_draw_4_5_13 vremove
+
Syntax:
+
~~~~{.php}
vremove meshname
~~~~
@@ -2245,13 +2348,14 @@ vremove meshname
Deletes MeshVS_Mesh object **meshname**.
**Example:**
+
~~~~{.php}
vinit
meshfromstl mesh myfile.stl
vremove mesh
~~~~
-@subsection occt_draw_4_6 VIS Viewer commands
+
A specific plugin with alias *VIS* should be loaded to have access to VIS functionality in DRAW Test Harness:
@@ -2259,27 +2363,30 @@ A specific plugin with alias *VIS* should be loaded to have access to VIS functi
\> pload VIS
~~~~
-@subsubsection occt_draw_4_6_1 ivtkinit
+
Syntax:
+
~~~~{.php}
ivtkinit
~~~~
Creates a window for VTK viewer.
-@figure{/user_guides/draw_test_harness/images/draw_image001.png,"",225}
+
-@subsubsection occt_draw_4_6_2 ivtkdisplay
+
Syntax:
+
~~~~{.php}
ivtkdisplay name1 [name2] …[name n]
~~~~
Displays named objects.
-**Example:**
+**Example:**
+
~~~~{.php}
ivtkinit
# create cone
@@ -2287,12 +2394,13 @@ pcone c 5 0 10
ivtkdisplay c
~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image002.png,"",261}
+
-@subsubsection occt_draw_4_6_3 ivtkerase
+
Syntax:
+
~~~~{.php}
ivtkerase [name1] [name2] … [name n]
~~~~
@@ -2300,6 +2408,7 @@ ivtkerase [name1] [name2] … [name n]
Erases named objects. If no arguments are passed, erases all displayed objects.
**Example:**
+
~~~~{.php}
ivtkinit
# create a sphere
@@ -2316,18 +2425,20 @@ ivtkerase cy
ivtkerase s c
~~~~
-@subsubsection occt_draw_4_6_4 ivtkfit
+
Syntax:
+
~~~~{.php}
ivtkfit
~~~~
Automatic zoom/panning.
-@subsubsection occt_draw_4_6_5 ivtkdispmode
+
Syntax:
+
~~~~{.php}
ivtksetdispmode [name] {0|1}
~~~~
@@ -2336,6 +2447,7 @@ Sets display mode for a named object. If no arguments are passed, sets the given
The possible modes are: 0 (WireFrame) and 1 (Shading).
**Example:**
+
~~~~{.php}
ivtkinit
# create a cone
@@ -2346,11 +2458,12 @@ ivtkdisplay c
ivtksetdispmode c 1
~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image003.png,"",262}
+
-@subsubsection occt_draw_4_6_6 ivtksetselmode
+
Syntax:
+
~~~~{.php}
ivtksetselmode [name] mode {0|1}
~~~~
@@ -2358,6 +2471,7 @@ ivtksetselmode [name] mode {0|1}
Sets selection mode for a named object. If no arguments are passed, sets the given selection mode for all the displayed objects.
**Example:**
+
~~~~{.php}
ivtkinit
# load a shape from file
@@ -2368,11 +2482,12 @@ ivtkdisplay a
ivtksetselmode a 4 1
~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image004.png,"",291}
+
-@subsubsection occt_draw_4_6_7 ivtkmoveto
+
Syntax:
+
~~~~{.php}
ivtkmoveto x y
~~~~
@@ -2380,6 +2495,7 @@ ivtkmoveto x y
Imitates mouse cursor moving to point with the given display coordinates **x**,**y**.
**Example:**
+
~~~~{.php}
ivtkinit
pcone c 5 0 10
@@ -2387,9 +2503,10 @@ ivtkdisplay c
ivtkmoveto 40 50
~~~~
-@subsubsection occt_draw_4_6_8 ivtkselect
+
Syntax:
+
~~~~{.php}
ivtkselect x y
~~~~
@@ -2397,6 +2514,7 @@ ivtkselect x y
Imitates mouse cursor moving to point with the given display coordinates and performs selection at this point.
**Example:**
+
~~~~{.php}
ivtkinit
pcone c 5 0 10
@@ -2404,9 +2522,10 @@ ivtkdisplay c
ivtkselect 40 50
~~~~
-@subsubsection occt_draw_4_6_9 ivtkdump
+
Syntax:
+
~~~~{.php}
ivtkdump *filename* [buffer={rgb|rgba|depth}] [width height] [stereoproj={L|R}]
~~~~
@@ -2418,6 +2537,7 @@ Dumps the contents of VTK viewer to image. It supports:
* dumping of stereo projections (left or right).
**Example:**
+
~~~~{.php}
ivtkinit
pcone c 5 0 10
@@ -2425,10 +2545,10 @@ ivtkdisplay c
ivtkdump D:/ConeSnapshot.png rgb 768 768
~~~~
-@subsubsection occt_draw_4_6_10 ivtkbgcolor
-
+
Syntax:
+
~~~~{.php}
ivtkbgcolor r g b [r2 g2 b2]
~~~~
@@ -2436,37 +2556,39 @@ ivtkbgcolor r g b [r2 g2 b2]
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].
**Example:**
+
~~~~{.php}
ivtkinit
ivtkbgcolor 200 220 250
~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image005.png,"",196}
+
~~~~{.php}
ivtkbgcolor 10 30 80 255 255 255
~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image006.png,"",190}
+
-@section occt_draw_5 OCAF commands
+
This chapter contains a set of commands for Open CASCADE Technology Application Framework (OCAF).
-@subsection occt_draw_5_1 Application commands
-
+
-@subsubsection occt_draw_5_1_1 NewDocument
+
Syntax:
+
~~~~{.php}
NewDocument docname [format]
~~~~
Creates a new **docname** document with MDTV-Standard or described format.
-**Example:**
+**Example:**
+
~~~~{.php}
# Create new document with default (MDTV-Standard) format
NewDocument D
@@ -2475,23 +2597,26 @@ NewDocument D
NewDocument D2 BinOcaf
~~~~
-@subsubsection occt_draw_5_1_2 IsInSession
+
Syntax:
+
~~~~{.php}
IsInSession path
~~~~
Returns *0*, if **path** document is managed by the application session, *1* -- otherwise.
-**Example:**
+**Example:**
+
~~~~{.php}
IsInSession /myPath/myFile.std
~~~~
-@subsubsection occt_draw_5_1_3 ListDocuments
+
Syntax:
+
~~~~{.php}
ListDocuments
~~~~
@@ -2499,9 +2624,10 @@ ListDocuments
Makes a list of documents handled during the session of the application.
-@subsubsection occt_draw_5_1_4 Open
+
Syntax:
+
~~~~{.php}
Open path docname [-stream]
~~~~
@@ -2510,42 +2636,48 @@ Retrieves the document of file **docname** in the path **path**. Overwrites the
option -stream activates usage of alternative interface of OCAF persistence working with C++ streams instead of file names.
-**Example:**
+**Example:**
+
~~~~{.php}
Open /myPath/myFile.std D
~~~~
-@subsubsection occt_draw_5_1_5 Close
+
Syntax:
+
~~~~{.php}
Close docname
~~~~
Closes **docname** document. The document is no longer handled by the applicative session.
-**Example:**
+**Example:**
+
~~~~{.php}
Close D
~~~~
-@subsubsection occt_draw_5_1_6 Save
+
Syntax:
+
~~~~{.php}
Save docname
~~~~
Saves **docname** active document.
-**Example:**
+**Example:**
+
~~~~{.php}
Save D
~~~~
-@subsubsection occt_draw_5_1_7 SaveAs
+
Syntax:
+
~~~~{.php}
SaveAs docname path [-stream]
~~~~
@@ -2554,14 +2686,15 @@ Saves the active document in the file **docname** in the path **path**. Overwrit
option -stream activates usage of alternative interface of OCAF persistence working with C++ streams instead of file names.
-**Example:**
+**Example:**
+
~~~~{.php}
SaveAs D /myPath/myFile.std
~~~~
-@subsection occt_draw_5_2 Basic commands
+
-@subsubsection occt_draw_5_2_1 Label
+
Syntax:
@@ -2572,11 +2705,12 @@ Label docname entry
Creates the label expressed by \ if it does not exist.
Example
+
~~~~{.php}
Label D 0:2
~~~~
-@subsubsection occt_draw_5_2_2 NewChild
+
Syntax:
@@ -2586,6 +2720,7 @@ NewChild docname [taggerlabel = Root label]
Finds (or creates) a *TagSource* attribute located at father label of \ and makes a new child label.
Example
+
~~~~{.php}
# Create new child of root label
NewChild D
@@ -2595,52 +2730,59 @@ Label D 0:2
NewChild D 0:2
~~~~
-@subsubsection occt_draw_5_2_3 Children
+
Syntax:
+
~~~~{.php}
Children docname label
~~~~
Returns the list of attributes of label.
Example
+
~~~~{.php}
Children D 0:2
~~~~
-@subsubsection occt_draw_5_2_4 ForgetAll
+
Syntax:
+
~~~~{.php}
ForgetAll docname label
~~~~
Forgets all attributes of the label.
Example
+
~~~~{.php}
ForgetAll D 0:2
~~~~
-@subsubsection occt_draw_5_3 Application commands
+
-@subsubsection occt_draw_5_3_1 Main
+
Syntax:
+
~~~~{.php}
Main docname
~~~~
Returns the main label of the framework.
-**Example:**
+**Example:**
+
~~~~{.php}
Main D
~~~~
-@subsubsection occt_draw_5_3_2 UndoLimit
+
Syntax:
+
~~~~{.php}
UndoLimit docname [value=0]
~~~~
@@ -2648,42 +2790,48 @@ UndoLimit docname [value=0]
Sets the limit on the number of Undo Delta stored. **0** will disable Undo on the document. A negative *value* means that there is no limit. Note that by default Undo is disabled. Enabling it will take effect with the next call to *NewCommand*. Of course, this limit is the same for Redo
-**Example:**
+**Example:**
+
~~~~{.php}
UndoLimit D 100
~~~~
-@subsubsection occt_draw_5_3_3 Undo
+
Syntax:
+
~~~~{.php}
Undo docname [value=1]
~~~~
Undoes **value** steps.
-**Example:**
+**Example:**
+
~~~~{.php}
Undo D
~~~~
-@subsubsection occt_draw_5_3_4 Redo
+
Syntax:
+
~~~~{.php}
Redo docname [value=1]
~~~~
Redoes **value** steps.
-**Example:**
+**Example:**
+
~~~~{.php}
Redo D
~~~~
-@subsubsection occt_draw_5_3_5 OpenCommand
+
Syntax:
+
~~~~{.php}
OpenCommand docname
~~~~
@@ -2691,83 +2839,95 @@ OpenCommand docname
Opens a new command transaction.
**Example:**
+
~~~~{.php}
OpenCommand D
~~~~
-@subsubsection occt_draw_5_3_6 CommitCommand
+
Syntax:
+
~~~~{.php}
CommitCommand docname
~~~~
Commits the Command transaction.
-**Example:**
+**Example:**
+
~~~~{.php}
CommitCommand D
~~~~
-@subsubsection occt_draw_5_3_7 NewCommand
+
Syntax:
+
~~~~{.php}
NewCommand docname
~~~~
This is a shortcut for Commit and Open transaction.
-**Example:**
+**Example:**
+
~~~~{.php}
NewCommand D
~~~~
-@subsubsection occt_draw_5_3_8 AbortCommand
+
Syntax:
+
~~~~{.php}
AbortCommand docname
~~~~
Aborts the Command transaction.
-**Example:**
+**Example:**
+
~~~~{.php}
AbortCommand D
~~~~
-@subsubsection occt_draw_5_3_9 Copy
+
Syntax:
+
~~~~{.php}
Copy docname entry Xdocname Xentry
~~~~
Copies the contents of *entry* to *Xentry*. No links are registered.
-**Example:**
+**Example:**
+
~~~~{.php}
Copy D1 0:2 D2 0:4
~~~~
-@subsubsection occt_draw_5_3_10 UpdateLink
+
Syntax:
+
~~~~{.php}
UpdateLink docname [entry]
~~~~
Updates external reference set at *entry*.
-**Example:**
+**Example:**
+
~~~~{.php}
UpdateLink D
~~~~
-@subsubsection occt_draw_5_3_11 CopyWithLink
+
Syntax:
+
~~~~{.php}
CopyWithLink docname entry Xdocname Xentry
~~~~
@@ -2775,579 +2935,656 @@ CopyWithLink docname entry Xdocname Xentry
Aborts the Command transaction.
Copies the content of *entry* to *Xentry*. The link is registered with an *Xlink* attribute at *Xentry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
CopyWithLink D1 0:2 D2 0:4
~~~~
-@subsubsection occt_draw_5_3_12 UpdateXLinks
+
Syntax:
+
~~~~{.php}
UpdateXLinks docname entry
~~~~
Sets modifications on labels impacted by external references to the *entry*. The *document* becomes invalid and must be recomputed
-**Example:**
+**Example:**
+
~~~~{.php}
UpdateXLinks D 0:2
~~~~
-@subsubsection occt_draw_5_3_13 DumpDocument
+
Syntax:
+
~~~~{.php}
DumpDocument docname
~~~~
Displays parameters of *docname* document.
-**Example:**
+**Example:**
+
~~~~{.php}
DumpDocument D
~~~~
-@subsection occt_draw_5_4 Data Framework commands
-
+
-@subsubsection occt_draw_5_4_1 MakeDF
+
Syntax:
+
~~~~{.php}
MakeDF dfname
~~~~
Creates a new data framework.
-**Example:**
+**Example:**
+
~~~~{.php}
MakeDF D
~~~~
-@subsubsection occt_draw_5_4_2 ClearDF
+
Syntax:
+
~~~~{.php}
ClearDF dfname
~~~~
Clears a data framework.
-**Example:**
+**Example:**
+
~~~~{.php}
ClearDF D
~~~~
-@subsubsection occt_draw_5_4_3 CopyDF
+
Syntax:
+
~~~~{.php}
CopyDF dfname1 entry1 [dfname2] entry2
~~~~
Copies a data framework.
-**Example:**
+**Example:**
+
~~~~{.php}
CopyDF D 0:2 0:4
~~~~
-@subsubsection occt_draw_5_4_4 CopyLabel
+
Syntax:
+
~~~~{.php}
CopyLabel dfname fromlabel tolablel
~~~~
Copies a label.
-**Example:**
+**Example:**
+
~~~~{.php}
CopyLabel D1 0:2 0:4
~~~~
-@subsubsection occt_draw_5_4_5 MiniDumpDF
+
Syntax:
+
~~~~{.php}
MiniDumpDF dfname
~~~~
Makes a mini-dump of a data framework.
-**Example:**
+**Example:**
+
~~~~{.php}
MiniDumpDF D
~~~~
-@subsubsection occt_draw_5_4_6 XDumpDF
+
Syntax:
+
~~~~{.php}
XDumpDF dfname
~~~~
Makes an extended dump of a data framework.
-**Example:**
+**Example:**
+
~~~~{.php}
XDumpDF D
~~~~
-@subsection occt_draw_5_5 General attributes commands
+
-
-@subsubsection occt_draw_5_5_1 SetInteger
+
Syntax:
+
~~~~{.php}
SetInteger dfname entry value
~~~~
Finds or creates an Integer attribute at *entry* label and sets *value*.
-**Example:**
+**Example:**
+
~~~~{.php}
SetInteger D 0:2 100
~~~~
-@subsubsection occt_draw_5_5_2 GetInteger
+
Syntax:
+
~~~~{.php}
GetInteger dfname entry [drawname]
~~~~
Gets a value of an Integer attribute at *entry* label and sets it to *drawname* variable, if it is defined.
-**Example:**
+**Example:**
+
~~~~{.php}
GetInteger D 0:2 Int1
~~~~
-@subsubsection occt_draw_5_5_3 SetReal
+
Syntax:
+
~~~~{.php}
SetReal dfname entry value
~~~~
Finds or creates a Real attribute at *entry* label and sets *value*.
-**Example:**
+**Example:**
+
~~~~{.php}
SetReal D 0:2 100.
~~~~
-@subsubsection occt_draw_5_5_4 GetReal
+
Syntax:
+
~~~~{.php}
GetReal dfname entry [drawname]
~~~~
Gets a value of a Real attribute at *entry* label and sets it to *drawname* variable, if it is defined.
-**Example:**
+**Example:**
+
~~~~{.php}
GetReal D 0:2 Real1
~~~~
-@subsubsection occt_draw_5_5_5 SetIntArray
+
Syntax:
+
~~~~{.php}
SetIntArray dfname entry lower upper value1 value2 …
~~~~
Finds or creates an IntegerArray attribute at *entry* label with lower and upper bounds and sets **value1*, *value2*...
-**Example:**
+**Example:**
+
~~~~{.php}
SetIntArray D 0:2 1 4 100 200 300 400
~~~~
-@subsubsection occt_draw_5_5_6 GetIntArray
+
Syntax:
+
~~~~{.php}
GetIntArray dfname entry
~~~~
Gets a value of an *IntegerArray* attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetIntArray D 0:2
~~~~
-@subsubsection occt_draw_5_5_7 SetRealArray
+
Syntax:
+
~~~~{.php}
SetRealArray dfname entry lower upper value1 value2 …
~~~~
Finds or creates a RealArray attribute at *entry* label with lower and upper bounds and sets *value1*, *value2*…
-**Example:**
+**Example:**
+
~~~~{.php}
GetRealArray D 0:2 1 4 100. 200. 300. 400.
~~~~
-@subsubsection occt_draw_5_5_8 GetRealArray
+
Syntax:
+
~~~~{.php}
GetRealArray dfname entry
~~~~
Gets a value of a RealArray attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetRealArray D 0:2
~~~~
-@subsubsection occt_draw_5_5_9 SetComment
+
Syntax:
+
~~~~{.php}
SetComment dfname entry value
~~~~
Finds or creates a Comment attribute at *entry* label and sets *value*.
-**Example:**
+**Example:**
+
~~~~{.php}
SetComment D 0:2 "My comment"
~~~~
-@subsubsection occt_draw_5_5_10 GetComment
+
Syntax:
+
~~~~{.php}
GetComment dfname entry
~~~~
Gets a value of a Comment attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetComment D 0:2
~~~~
-@subsubsection occt_draw_5_5_11 SetExtStringArray
+
Syntax:
+
~~~~{.php}
SetExtStringArray dfname entry lower upper value1 value2 …
~~~~
Finds or creates an *ExtStringArray* attribute at *entry* label with lower and upper bounds and sets *value1*, *value2*…
-**Example:**
+**Example:**
+
~~~~{.php}
SetExtStringArray D 0:2 1 3 *string1* *string2* *string3*
~~~~
-@subsubsection occt_draw_5_5_12 GetExtStringArray
+
Syntax:
+
~~~~{.php}
GetExtStringArray dfname entry
~~~~
Gets a value of an ExtStringArray attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetExtStringArray D 0:2
~~~~
-@subsubsection occt_draw_5_5_13 SetName
+
Syntax:
+
~~~~{.php}
SetName dfname entry value
~~~~
Finds or creates a Name attribute at *entry* label and sets *value*.
-**Example:**
+**Example:**
+
~~~~{.php}
SetName D 0:2 *My name*
~~~~
-@subsubsection occt_draw_5_5_14 GetName
+
Syntax:
+
~~~~{.php}
GetName dfname entry
~~~~
Gets a value of a Name attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetName D 0:2
~~~~
-@subsubsection occt_draw_5_5_15 SetReference
+
Syntax:
+
~~~~{.php}
SetReference dfname entry reference
~~~~
Creates a Reference attribute at *entry* label and sets *reference*.
-**Example:**
+**Example:**
+
~~~~{.php}
SetReference D 0:2 0:4
~~~~
-@subsubsection occt_draw_5_5_16 GetReference
+
Syntax:
+
~~~~{.php}
GetReference dfname entry
~~~~
Gets a value of a Reference attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetReference D 0:2
~~~~
-@subsubsection occt_draw_5_5_17 SetUAttribute
+
Syntax:
+
~~~~{.php}
SetUAttribute dfname entry localGUID
~~~~
Creates a UAttribute attribute at *entry* label with *localGUID*.
-**Example:**
+**Example:**
+
~~~~{.php}
set localGUID "c73bd076-22ee-11d2-acde-080009dc4422"
SetUAttribute D 0:2 ${localGUID}
~~~~
-@subsubsection occt_draw_5_5_18 GetUAttribute
+
Syntax:
+
~~~~{.php}
GetUAttribute dfname entry loacalGUID
~~~~
Finds a *UAttribute* at *entry* label with *localGUID*.
-**Example:**
+**Example:**
+
~~~~{.php}
set localGUID "c73bd076-22ee-11d2-acde-080009dc4422"
GetUAttribute D 0:2 ${localGUID}
~~~~
-@subsubsection occt_draw_5_5_19 SetFunction
+
Syntax:
+
~~~~{.php}
SetFunction dfname entry ID failure
~~~~
Finds or creates a *Function* attribute at *entry* label with driver ID and *failure* index.
-**Example:**
+**Example:**
+
~~~~{.php}
set ID "c73bd076-22ee-11d2-acde-080009dc4422"
SetFunction D 0:2 ${ID} 1
~~~~
-@subsubsection occt_draw_5_5_20 GetFunction
+
Syntax:
+
~~~~{.php}
GetFunction dfname entry ID failure
~~~~
Finds a Function attribute at *entry* label and sets driver ID to *ID* variable and failure index to *failure* variable.
-**Example:**
+**Example:**
+
~~~~{.php}
GetFunction D 0:2 ID failure
~~~~
-@subsubsection occt_draw_5_5_21 NewShape
+
Syntax:
+
~~~~{.php}
NewShape dfname entry [shape]
~~~~
Finds or creates a Shape attribute at *entry* label. Creates or updates the associated *NamedShape* attribute by *shape* if *shape* is defined.
-**Example:**
+**Example:**
+
~~~~{.php}
box b 10 10 10
NewShape D 0:2 b
~~~~
-@subsubsection occt_draw_5_5_22 SetShape
+
Syntax:
+
~~~~{.php}
SetShape dfname entry shape
~~~~
Creates or updates a *NamedShape* attribute at *entry* label by *shape*.
-**Example:**
+**Example:**
+
~~~~{.php}
box b 10 10 10
SetShape D 0:2 b
~~~~
-@subsubsection occt_draw_5_5_23 GetShape
+
Syntax:
+
~~~~{.php}
GetShape2 dfname entry shape
~~~~
Sets a shape from NamedShape attribute associated with *entry* label to *shape* draw variable.
-**Example:**
+**Example:**
+
~~~~{.php}
GetShape2 D 0:2 b
~~~~
-@subsection occt_draw_5_6 Geometric attributes commands
+
-
-@subsubsection occt_draw_5_6_1 SetPoint
+
Syntax:
+
~~~~{.php}
SetPoint dfname entry point
~~~~
Finds or creates a Point attribute at *entry* label and sets *point* as generated in the associated *NamedShape* attribute.
-**Example:**
+**Example:**
+
~~~~{.php}
point p 10 10 10
SetPoint D 0:2 p
~~~~
-@subsubsection occt_draw_5_6_2 GetPoint
+
Syntax:
+
~~~~{.php}
GetPoint dfname entry [drawname]
~~~~
Gets a vertex from *NamedShape* attribute at *entry* label and sets it to *drawname* variable, if it is defined.
-**Example:**
+**Example:**
+
~~~~{.php}
GetPoint D 0:2 p
~~~~
-@subsubsection occt_draw_5_6_3 SetAxis
+
Syntax:
+
~~~~{.php}
SetAxis dfname entry axis
~~~~
Finds or creates an Axis attribute at *entry* label and sets *axis* as generated in the associated *NamedShape* attribute.
-**Example:**
+**Example:**
+
~~~~{.php}
line l 10 20 30 100 200 300
SetAxis D 0:2 l
~~~~
-@subsubsection occt_draw_5_6_4 GetAxis
+
Syntax:
+
~~~~{.php}
GetAxis dfname entry [drawname]
~~~~
Gets a line from *NamedShape* attribute at *entry* label and sets it to *drawname* variable, if it is defined.
-**Example:**
+**Example:**
+
~~~~{.php}
GetAxis D 0:2 l
~~~~
-@subsubsection occt_draw_5_6_5 SetPlane
+
Syntax:
+
~~~~{.php}
SetPlane dfname entry plane
~~~~
Finds or creates a Plane attribute at *entry* label and sets *plane* as generated in the associated *NamedShape* attribute.
-**Example:**
+**Example:**
+
~~~~{.php}
plane pl 10 20 30 -1 0 0
SetPlane D 0:2 pl
~~~~
-@subsubsection occt_draw_5_6_6 GetPlane
+
Syntax:
+
~~~~{.php}
GetPlane dfname entry [drawname]
~~~~
Gets a plane from *NamedShape* attribute at *entry* label and sets it to *drawname* variable, if it is defined.
-**Example:**
+**Example:**
+
~~~~{.php}
GetPlane D 0:2 pl
~~~~
-@subsubsection occt_draw_5_6_7 SetGeometry
+
Syntax:
+
~~~~{.php}
SetGeometry dfname entry [type] [shape]
~~~~
Creates a Geometry attribute at *entry* label and sets *type* and *shape* as generated in the associated *NamedShape* attribute if they are defined. *type* must be one of the following: *any, pnt, lin, cir, ell, spl, pln, cyl*.
-**Example:**
+**Example:**
+
~~~~{.php}
point p 10 10 10
SetGeometry D 0:2 pnt p
~~~~
-@subsubsection occt_draw_5_6_8 GetGeometryType
+
Syntax:
+
~~~~{.php}
GetGeometryType dfname entry
~~~~
Gets a geometry type from Geometry attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetGeometryType D 0:2
~~~~
-@subsubsection occt_draw_5_6_9 SetConstraint
+
Syntax:
+
~~~~{.php}
SetConstraint dfname entry keyword geometrie [geometrie …]
SetConstraint dfname entry "plane" geometrie
@@ -3360,61 +3597,68 @@ SetConstraint dfname entry "value" value
2. Sets plane for the existing constraint.
3. Sets value for the existing constraint.
-**Example:**
+**Example:**
+
~~~~{.php}
SetConstraint D 0:2 "value" 5
~~~~
-@subsubsection occt_draw_5_6_10 GetConstraint
+
Syntax:
+
~~~~{.php}
GetConstraint dfname entry
~~~~
Dumps a Constraint attribute at *entry* label
-**Example:**
+**Example:**
+
~~~~{.php}
GetConstraint D 0:2
~~~~
-@subsubsection occt_draw_5_6_11 SetVariable
+
Syntax:
+
~~~~{.php}
SetVariable dfname entry isconstant(0/1) units
~~~~
Creates a Variable attribute at *entry* label and sets *isconstant* flag and *units* as a string.
-**Example:**
+**Example:**
+
~~~~{.php}
SetVariable D 0:2 1 "mm"
~~~~
-@subsubsection occt_draw_5_6_12 GetVariable
+
Syntax:
+
~~~~{.php}
GetVariable dfname entry isconstant units
~~~~
Gets an *isconstant* flag and units of a Variable attribute at *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
GetVariable D 0:2 isconstant units
puts "IsConstant=${isconstant}"
puts "Units=${units}"
~~~~
-@subsection occt_draw_5_7 Tree attributes commands
-
+
-@subsubsection occt_draw_5_7_1 RootNode
+
Syntax:
+
~~~~{.php}
RootNode dfname treenodeentry [ID]
~~~~
@@ -3422,9 +3666,10 @@ RootNode dfname treenodeentry [ID]
Returns the ultimate father of *TreeNode* attribute identified by its *treenodeentry* and its *ID* (or default ID, if *ID* is not defined).
-@subsubsection occt_draw_5_7_2 SetNode
+
Syntax:
+
~~~~{.php}
SetNode dfname treenodeentry [ID]
~~~~
@@ -3432,9 +3677,10 @@ SetNode dfname treenodeentry [ID]
Creates a *TreeNode* attribute on the *treenodeentry* label with its tree *ID* (or assigns a default ID, if the *ID* is not defined).
-@subsubsection occt_draw_5_7_3 AppendNode
+
Syntax:
+
~~~~{.php}
AppendNode dfname fatherentry childentry [fatherID]
~~~~
@@ -3445,9 +3691,10 @@ Inserts a *TreeNode* attribute with its tree *fatherID* (or default ID, if *fath
-@subsubsection occt_draw_5_7_4 PrependNode
+
Syntax:
+
~~~~{.php}
PrependNode dfname fatherentry childentry [fatherID]
~~~~
@@ -3456,9 +3703,10 @@ PrependNode dfname fatherentry childentry [fatherID]
Inserts a *TreeNode* attribute with its tree *fatherID* (or default ID, if *fatherID* is not defined) on *childentry* as first child of *fatherentry*.
-@subsubsection occt_draw_5_7_5 InsertNodeBefore
+
Syntax:
+
~~~~{.php}
InsertNodeBefore dfname treenodeentry beforetreenode [ID]
~~~~
@@ -3466,9 +3714,10 @@ InsertNodeBefore dfname treenodeentry beforetreenode [ID]
Inserts a *TreeNode* attribute with tree *ID* (or default ID, if *ID* is not defined) *beforetreenode* before *treenodeentry*.
-@subsubsection occt_draw_5_7_6 InsertNodeAfter
+
Syntax:
+
~~~~{.php}
InsertNodeAfter dfname treenodeentry aftertreenode [ID]
~~~~
@@ -3476,9 +3725,10 @@ InsertNodeAfter dfname treenodeentry aftertreenode [ID]
Inserts a *TreeNode* attribute with tree *ID* (or default ID, if *ID* is not defined) *aftertreenode* after *treenodeentry*.
-@subsubsection occt_draw_5_7_7 DetachNode
+
Syntax:
+
~~~~{.php}
DetachNode dfname treenodeentry [ID]
~~~~
@@ -3486,9 +3736,10 @@ DetachNode dfname treenodeentry [ID]
Removes a *TreeNode* attribute with tree *ID* (or default ID, if *ID* is not defined) from *treenodeentry*.
-@subsubsection occt_draw_5_7_8 ChildNodeIterate
+
Syntax:
+
~~~~{.php}
ChildNodeIterate dfname treenodeentry alllevels(0/1) [ID]
~~~~
@@ -3496,7 +3747,8 @@ ChildNodeIterate dfname treenodeentry alllevels(0/1) [ID]
Iterates on the tree of *TreeNode* attributes with tree *ID* (or default ID, if *ID* is not defined). If *alllevels* is set to *1* it explores not only the first, but all the sub Step levels.
-**Example:**
+**Example:**
+
~~~~{.php}
Label D 0:2
Label D 0:3
@@ -3542,9 +3794,10 @@ ChildNodeIterate D 0:2 1
==0:5
~~~~
-@subsubsection occt_draw_5_7_9 InitChildNodeIterator
+
Syntax:
+
~~~~{.php}
InitChildNodeIterator dfname treenodeentry alllevels(0/1) [ID]
~~~~
@@ -3552,7 +3805,8 @@ InitChildNodeIterator dfname treenodeentry alllevels(0/1) [ID]
Initializes the iteration on the tree of *TreeNode* attributes with tree *ID* (or default ID, if *ID* is not defined). If *alllevels* is set to *1* it explores not only the first, but also all sub Step levels.
-**Example:**
+**Example:**
+
~~~~{.php}
InitChildNodeIterate D 0:5 1
set aChildNumber 0
@@ -3566,9 +3820,10 @@ for {set i 1} {$i < 100} {incr i} {
puts "aChildNumber=$aChildNumber"
~~~~
-@subsubsection occt_draw_5_7_10 ChildNodeMore
+
Syntax:
+
~~~~{.php}
ChildNodeMore
~~~~
@@ -3576,9 +3831,10 @@ ChildNodeMore
Returns TRUE if there is a current item in the iteration.
-@subsubsection occt_draw_5_7_11 ChildNodeNext
+
Syntax:
+
~~~~{.php}
ChildNodeNext
~~~~
@@ -3586,9 +3842,10 @@ ChildNodeNext
Moves to the next Item.
-@subsubsection occt_draw_5_7_12 ChildNodeValue
+
Syntax:
+
~~~~{.php}
ChildNodeValue
~~~~
@@ -3596,9 +3853,10 @@ ChildNodeValue
Returns the current treenode of *ChildNodeIterator*.
-@subsubsection occt_draw_5_7_13 ChildNodeNextBrother
+
Syntax:
+
~~~~{.php}
ChildNodeNextBrother
~~~~
@@ -3606,223 +3864,252 @@ ChildNodeNextBrother
Moves to the next *Brother*. If there is none, goes up. This method is interesting only with *allLevels* behavior.
-@subsection occt_draw_5_8 Standard presentation commands
-
+
-@subsubsection occt_draw_5_8_1 AISInitViewer
+
Syntax:
+
~~~~{.php}
AISInitViewer docname
~~~~
Creates and sets *AISViewer* attribute at root label, creates AIS viewer window.
-**Example:**
+**Example:**
+
~~~~{.php}
AISInitViewer D
~~~~
-@subsubsection occt_draw_5_8_2 AISRepaint
+
Syntax:
+
~~~~{.php}
AISRepaint docname
~~~~
Updates the AIS viewer window.
-**Example:**
+**Example:**
+
~~~~{.php}
AISRepaint D
~~~~
-@subsubsection occt_draw_5_8_3 AISDisplay
+
Syntax:
+
~~~~{.php}
AISDisplay docname entry [not_update]
~~~~
Displays a presantation of *AISobject* from *entry* label in AIS viewer. If *not_update* is not defined then *AISobject* is recomputed and all visualization settings are applied.
-**Example:**
+**Example:**
+
~~~~{.php}
AISDisplay D 0:5
~~~~
-@subsubsection occt_draw_5_8_4 AISUpdate
+
Syntax:
+
~~~~{.php}
AISUpdate docname entry
~~~~
Recomputes a presentation of *AISobject* from *entry* label and applies the visualization setting in AIS viewer.
-**Example:**
+**Example:**
+
~~~~{.php}
AISUpdate D 0:5
~~~~
-@subsubsection occt_draw_5_8_5 AISErase
+
Syntax:
+
~~~~{.php}
AISErase docname entry
~~~~
Erases *AISobject* of *entry* label in AIS viewer.
-**Example:**
+**Example:**
+
~~~~{.php}
AISErase D 0:5
~~~~
-@subsubsection occt_draw_5_8_6 AISRemove
+
Syntax:
+
~~~~{.php}
AISRemove docname entry
~~~~
Erases *AISobject* of *entry* label in AIS viewer, then *AISobject* is removed from *AIS_InteractiveContext*.
-**Example:**
+**Example:**
+
~~~~{.php}
AISRemove D 0:5
~~~~
-@subsubsection occt_draw_5_8_7 AISSet
+
Syntax:
+
~~~~{.php}
AISSet docname entry ID
~~~~
Creates *AISPresentation* attribute at *entry* label and sets as driver ID. ID must be one of the following: *A* (*axis*), *C* (*constraint*), *NS* (*namedshape*), *G* (*geometry*), *PL* (*plane*), *PT* (*point*).
-**Example:**
+**Example:**
+
~~~~{.php}
AISSet D 0:5 NS
~~~~
-@subsubsection occt_draw_5_8_8 AISDriver
+
Syntax:
+
~~~~{.php}
AISDriver docname entry [ID]
~~~~
Returns DriverGUID stored in *AISPresentation* attribute of an *entry* label or sets a new one. ID must be one of the following: *A* (*axis*), *C* (*constraint*), *NS* (*namedshape*), *G* (*geometry*), *PL* (*plane*), *PT* (*point*).
-**Example:**
+**Example:**
+
~~~~{.php}
# Get Driver GUID
AISDriver D 0:5
~~~~
-@subsubsection occt_draw_5_8_9 AISUnset
+
Syntax:
+
~~~~{.php}
AISUnset docname entry
~~~~
Deletes *AISPresentation* attribute (if it exists) of an *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
AISUnset D 0:5
~~~~
-@subsubsection occt_draw_5_8_10 AISTransparency
+
Syntax:
+
~~~~{.php}
AISTransparency docname entry [transparency]
~~~~
Sets (if *transparency* is defined) or gets the value of transparency for *AISPresentation* attribute of an *entry* label.
-**Example:**
+**Example:**
+
~~~~{.php}
AISTransparency D 0:5 0.5
~~~~
-@subsubsection occt_draw_5_8_11 AISHasOwnTransparency
+
Syntax:
+
~~~~{.php}
AISHasOwnTransparency docname entry
~~~~
Tests *AISPresentation* attribute of an *entry* label by own transparency.
-**Example:**
+**Example:**
+
~~~~{.php}
AISHasOwnTransparency D 0:5
~~~~
-@subsubsection occt_draw_5_8_12 AISMaterial
+
Syntax:
+
~~~~{.php}
AISMaterial docname entry [material]
~~~~
-Sets (if *material* is defined) or gets the value of transparency for *AISPresentation* attribute of an *entry* label. *material* is integer from 0 to 20 (see @ref occt_draw_4_5_6 "meshmat" command).
+Sets (if *material* is defined) or gets the value of transparency for *AISPresentation* attribute of an *entry* label. *material* is integer from 0 to 20 (see [meshmat](#occt_draw_4_5_6) command).
+
+**Example:**
-**Example:**
~~~~{.php}
AISMaterial D 0:5 5
~~~~
-@subsubsection occt_draw_5_8_13 AISHasOwnMaterial
+
Syntax:
+
~~~~{.php}
AISHasOwnMaterial docname entry
~~~~
Tests *AISPresentation* attribute of an *entry* label by own material.
-**Example:**
+**Example:**
+
~~~~{.php}
AISHasOwnMaterial D 0:5
~~~~
-@subsubsection occt_draw_5_8_14 AISColor
+
Syntax:
+
~~~~{.php}
AISColor docname entry [color]
~~~~
Sets (if *color* is defined) or gets value of color for *AISPresentation* attribute of an *entry* label. *color* is integer from 0 to 516 (see color names in *vsetcolor*).
-**Example:**
+**Example:**
+
~~~~{.php}
AISColor D 0:5 25
~~~~
-@subsubsection occt_draw_5_8_15 AISHasOwnColor
+
Syntax:
+
~~~~{.php}
AISHasOwnColor docname entry
~~~~
Tests *AISPresentation* attribute of an *entry* label by own color.
-**Example:**
+**Example:**
+
~~~~{.php}
AISHasOwnColor D 0:5
~~~~
-@section occt_draw_6 Geometry commands
+
-@subsection occt_draw_6_1 Overview
+
Draw provides a set of commands to test geometry libraries. These commands are found in the TGEOMETRY executable, or in any Draw executable which includes *GeometryTest* commands.
@@ -3850,7 +4137,7 @@ Where possible, the commands have been made broad in application, i.e. they appl
Likewise, the *translate* command will process points, curves or surfaces, depending on argument type. You may not always find the specific command you are looking for in the section where you expect it to be. In that case, look in another section. The *trim* command, for example, is described in the surface section. It can, nonetheless, be used with curves as well.
-@subsection occt_draw_6_2 Curve creation
+
This section deals with both points and curves. Types of curves are:
@@ -3864,9 +4151,10 @@ This section deals with both points and curves. Types of curves are:
Curves are displayed with an arrow showing the last parameter.
-@subsubsection occt_draw_6_2_1 point
+
Syntax:
+
~~~~{.php}
point name x y [z]
~~~~
@@ -3874,6 +4162,7 @@ point name x y [z]
Creates a 2d or 3d point, depending on the number of arguments.
**Example:**
+
~~~~{.php}
# 2d point
point p1 1 2
@@ -3882,9 +4171,10 @@ point p1 1 2
point p2 10 20 -5
~~~~
-@subsubsection occt_draw_6_2_2 line
+
Syntax:
+
~~~~{.php}
line name x y [z] dx dy [dz]
~~~~
@@ -3894,7 +4184,8 @@ Creates a 2d or 3d line. *x y z* are the coordinates of the line’s point of or
A 2d line will be represented as *x y dx dy*, and a 3d line as *x y z dx dy dz* . A line is parameterized along its length starting from the point of origin along the direction vector. The direction vector is normalized and must not be null. Lines are infinite, even though their representation is not.
-**Example:**
+**Example:**
+
~~~~{.php}
# a 2d line at 45 degrees of the X axis
line l 2 0 1 1
@@ -3903,9 +4194,10 @@ line l 2 0 1 1
line l 10 0 0 0 0 1
~~~~
-@subsubsection occt_draw_6_2_3 circle
+
Syntax:
+
~~~~{.php}
circle name x y [z [dx dy dz]] [ux uy [uz]] radius
~~~~
@@ -3918,7 +4210,8 @@ In 3d, *x, y, z* are the coordinates of the center; *dx, dy, dz* give the vector
The circle is parameterized by the angle in [0,2*pi] starting from the origin and. Note that the specification of origin direction and plane is the same for all analytical curves and surfaces.
-**Example:**
+**Example:**
+
~~~~{.php}
# A 2d circle of radius 5 centered at 10,-2
circle c1 10 -2 5
@@ -3938,14 +4231,15 @@ circle c4 10 20 -5 0 1 0 17
circle c5 10 20 -5 1 0 0 0 0 1 17
~~~~
-@subsubsection occt_draw_6_2_4 ellipse
+
Syntax:
+
~~~~{.php}
ellipse name x y [z [dx dy dz]] [ux uy [uz]] firstradius secondradius
~~~~
-Creates a 2d or 3d ellipse. In a 2d ellipse, the first two arguments define the center; in a 3d ellipse, the first three. The axis system is given by *firstradius*, the major radius, and *secondradius*, the minor radius. The parameter range of the ellipse is [0,2.*pi] starting from the X axis and going towards the Y axis. The Draw ellipse is parameterized by an angle:
+Creates a 2d or 3d ellipse. In a 2d ellipse, the first two arguments define the center; in a 3d ellipse, the first three. The axis system is given by *firstradius*, the major radius, and *secondradius*, the minor radius. The parameter range of the ellipse is [0,2.*pi] starting from the X axis and going towards the Y axis. The Draw ellipse is parameterized by an angle:
~~~~{.php}
P(u) = O + firstradius*cos(u)*Xdir + secondradius*sin(u)*Ydir
@@ -3956,6 +4250,7 @@ Where:
* *O, Xdir* and *Ydir* are respectively the origin, *X Direction* and *Y Direction* of its local coordinate system.
**Example:**
+
~~~~{.php}
# default 2d ellipse
ellipse e1 10 5 20 10
@@ -3970,16 +4265,18 @@ ellipse e3 0 0 0 25 5
ellipse e4 0 0 0 0 1 0 1 0 1 25 5
~~~~
-@subsubsection occt_draw_6_2_5 hyperbola
+
Syntax:
+
~~~~{.php}
hyperbola name x y [z [dx dy dz]] [ux uy [uz]] firstradius secondradius
~~~~
Creates a 2d or 3d conic. The first arguments define the center. The axis system is given by *firstradius*, the major radius, and *secondradius*, the minor radius. Note that the hyperbola has only one branch, that in the X direction.
-The Draw hyperbola is parameterized as follows:
+The Draw hyperbola is parameterized as follows:
+
~~~~{.php}
P(U) = O + firstradius*Cosh(U)*XDir + secondradius*Sinh(U)*YDir
~~~~
@@ -3988,7 +4285,8 @@ Where:
* *P* is the point of parameter *U*,
* *O, XDir* and *YDir* are respectively the origin, *X Direction* and *YDirection* of its local coordinate system.
-**Example:**
+**Example:**
+
~~~~{.php}
# default 2d hyperbola, with asymptotes 1,1 -1,1
hyperbola h1 0 0 30 30
@@ -4000,16 +4298,17 @@ hyperbola h2 0 0 1 2 20 20
hyperbola h3 0 0 0 50 50
~~~~
-@subsubsection occt_draw_6_2_6 parabola
+
Syntax:
+
~~~~{.php}
parabola name x y [z [dx dy dz]] [ux uy [uz]] FocalLength
~~~~
Creates a 2d or 3d parabola. in the axis system defined by the first arguments. The origin is the apex of the parabola.
-The *Geom_Parabola* is parameterized as follows:
+The *Geom_Parabola* is parameterized as follows:
~~~~{.php}
P(u) = O + u*u/(4.*F)*XDir + u*YDir
@@ -4020,7 +4319,8 @@ Where:
* *O, XDir* and *YDir* are respectively the origin, *X Direction* and *Y Direction* of its local coordinate system,
* *F* is the focal length of the parabola.
-**Example:**
+**Example:**
+
~~~~{.php}
# 2d parabola
parabola p1 0 0 50
@@ -4032,9 +4332,10 @@ parabola p2 0 0 0 1 50
parabola p3 0 0 0 1 0 0 0 0 1 50
~~~~
-@subsubsection occt_draw_6_2_7 beziercurve, 2dbeziercurve
+
Syntax:
+
~~~~{.php}
beziercurve name nbpole pole, [weight]
2dbeziercurve name nbpole pole, [weight]
@@ -4042,7 +4343,8 @@ beziercurve name nbpole pole, [weight]
Creates a 3d rational or non-rational Bezier curve. Give the number of poles (control points,) and the coordinates of the poles *(x1 y1 z1 [w1] x2 y2 z2 [w2])*. The degree will be *nbpoles-1*. To create a rational curve, give weights with the poles. You must give weights for all poles or for none. If the weights of all the poles are equal, the curve is polynomial, and therefore non-rational.
-**Example:**
+**Example:**
+
~~~~{.php}
# a rational 2d bezier curve (arc of circle)
2dbeziercurve ci 3 0 0 1 10 0 sqrt(2.)/2. 10 10 1
@@ -4051,9 +4353,10 @@ Creates a 3d rational or non-rational Bezier curve. Give the number of poles (co
beziercurve cc 4 0 0 0 10 0 0 10 0 10 10 10 10
~~~~
-@subsubsection occt_draw_6_2_8 bsplinecurve, 2dbsplinecurve, pbsplinecurve, 2dpbsplinecurve
+
Syntax:
+
~~~~{.php}
bsplinecurve name degree nbknots knot, umult pole, weight
2dbsplinecurve name degree nbknots knot, umult pole, weight
@@ -4074,7 +4377,8 @@ The poles must be given with their weights, use weights of 1 for a non rational
* For a non periodic curve: Sum of multiplicities - degree + 1
* For a periodic curve: Sum of multiplicities - last multiplicity
-**Example:**
+**Example:**
+
~~~~{.php}
# a bspline curve with 4 poles and 3 knots
bsplinecurve bc 2 3 0 3 1 1 2 3 \
@@ -4095,9 +4399,10 @@ dset h sqrt(3)/2
**Note** that you can create the **NURBS** subset of bspline curves and surfaces by trimming analytical curves and surfaces and executing the command *convert*.
-@subsubsection occt_draw_6_2_9 uiso, viso
+
Syntax:
+
~~~~{.php}
uiso name surface u
viso name surface u
@@ -4105,7 +4410,8 @@ viso name surface u
Creates a U or V isoparametric curve from a surface.
-**Example:**
+**Example:**
+
~~~~{.php}
# create a cylinder and extract iso curves
@@ -4117,9 +4423,10 @@ viso c2 c
**Note** that this cannot be done from offset surfaces.
-@subsubsection occt_draw_6_2_10 to3d, to2d
+
Syntax:
+
~~~~{.php}
to3d name curve2d [plane]
to2d name curve3d [plane]
@@ -4127,7 +4434,8 @@ to2d name curve3d [plane]
Create respectively a 3d curve from a 2d curve and a 2d curve from a 3d curve. The transformation uses a planar surface to define the XY plane in 3d (by default this plane is the default OXYplane). **to3d** always gives a correct result, but as **to2d** is not a projection, it may surprise you. It is always correct if the curve is planar and parallel to the plane of projection. The points defining the curve are projected on the plane. A circle, however, will remain a circle and will not be changed to an ellipse.
-**Example:**
+**Example:**
+
~~~~{.php}
# the following commands
circle c 0 0 5
@@ -4141,16 +4449,17 @@ circle c -2 1 0 1 2 3 5
See also: **project**
-@subsubsection occt_draw_6_2_11 project
+
Syntax:
+
~~~~{.php}
project name curve3d surface
~~~~
Computes a 2d curve in the parametric space of a surface corresponding to a 3d curve. This can only be used on analytical surfaces.
-If we, for example, intersect a cylinder and a plane and project the resulting ellipse on the cylinder, this will create a 2d sinusoid-like bspline.
+If we, for example, intersect a cylinder and a plane and project the resulting ellipse on the cylinder, this will create a 2d sinusoid-like bspline.
~~~~{.php}
cylinder c 5
@@ -4159,7 +4468,7 @@ intersect i c p
project i2d i c
~~~~
-@subsection occt_draw_6_3 Surface creation
+
The following types of surfaces exist:
* Analytical surfaces: plane, cylinder, cone, sphere, torus;
@@ -4170,9 +4479,10 @@ The following types of surfaces exist:
Surfaces are displayed with isoparametric lines. To show the parameterization, a small parametric line with a length 1/10 of V is displayed at 1/10 of U.
-@subsubsection occt_draw_6_3_1 plane
+
Syntax:
+
~~~~{.php}
plane name [x y z [dx dy dz [ux uy uz]]]
~~~~
@@ -4187,7 +4497,8 @@ There are default values for the coordinate system. If no arguments are given, t
Note that this definition will be used for all analytical surfaces.
-**Example:**
+**Example:**
+
~~~~{.php}
# a plane through the point 10,0,0 perpendicular to X
# with U direction on Y
@@ -4197,16 +4508,18 @@ plane p1 10 0 0 1 0 0 0 1 0
plane p2 10 -20 -5
~~~~
-@subsubsection occt_draw_6_3_2 cylinder
+
Syntax:
+
~~~~{.php}
cylinder name [x y z [dx dy dz [ux uy uz]]] radius
~~~~
A cylinder is defined by a coordinate system, and a radius. The surface generated is an infinite cylinder with the Z axis as the axis. The U parameter is the angle starting from X going in the Y direction.
-**Example:**
+**Example:**
+
~~~~{.php}
# a cylinder on the default Z axis, radius 10
cylinder c1 10
@@ -4222,15 +4535,17 @@ cylinder c3 0 0 0 cos(la)*cos(lo) cos(la)*sin(lo)
sin(la) 10
~~~~
-@subsubsection occt_draw_6_3_3 cone
+
Syntax:
+
~~~~{.php}
cone name [x y z [dx dy dz [ux uy uz]]] semi-angle radius
~~~~
Creates a cone in the infinite coordinate system along the Z-axis. The radius is that of the circle at the intersection of the cone and the XY plane. The semi-angle is the angle formed by the cone relative to the axis; it should be between -90 and 90. If the radius is 0, the vertex is the origin.
-**Example:**
+**Example:**
+
~~~~{.php}
# a cone at 45 degrees at the origin on Z
cone c1 45 0
@@ -4239,9 +4554,10 @@ cone c1 45 0
cone c2 0 0 z1 180.*atan2(r2-r1,z2-z1)/pi r1
~~~~
-@subsubsection occt_draw_6_3_4 sphere
+
Syntax:
+
~~~~{.php}
sphere name [x y z [dx dy dz [ux uy uz]]] radius
~~~~
@@ -4251,6 +4567,7 @@ Creates a sphere in the local coordinate system defined in the **plane** command
To parameterize the sphere, *u* is the angle from X to Y, between 0 and 2*pi. *v* is the angle in the half-circle at angle *u* in the plane containing the Z axis. *v* is between -pi/2 and pi/2. The poles are the points Z = +/- radius; their parameters are u,+/-pi/2 for any u in 0,2*pi.
**Example:**
+
~~~~{.php}
# a sphere at the origin
sphere s1 10
@@ -4258,9 +4575,10 @@ sphere s1 10
sphere s2 10 10 10 1 1 1 10
~~~~
-@subsubsection occt_draw_6_3_5 torus
+
Syntax:
+
~~~~{.php}
torus name [x y z [dx dy dz [ux uy uz]]] major minor
~~~~
@@ -4269,7 +4587,8 @@ Creates a torus in the local coordinate system with the given major and minor ra
To parameterize a torus, *u* is the angle from X to Y; *v* is the angle in the plane at angle *u* from the XY plane to Z. *u* and *v* are in 0,2*pi.
-**Example:**
+**Example:**
+
~~~~{.php}
# a torus at the origin
torus t1 20 5
@@ -4279,9 +4598,10 @@ torus t2 10 5 -2 2 1 0 20 5
~~~~
-@subsubsection occt_draw_6_3_6 beziersurf
+
Syntax:
+
~~~~{.php}
beziersurf name nbupoles nbvolpes pole, [weight]
~~~~
@@ -4292,7 +4612,8 @@ Then give the poles in the following order: *pole(1, 1), pole(nbupoles, 1), pole
Weights may be omitted, but if you give one weight you must give all of them.
-**Example:**
+**Example:**
+
~~~~{.php}
# a non-rational degree 2,3 surface
beziersurf s 3 4 \
@@ -4302,9 +4623,10 @@ beziersurf s 3 4 \
0 30 0 10 30 0 20 30 0
~~~~
-@subsubsection occt_draw_6_3_7 bsplinesurf, upbsplinesurf, vpbsplinesurf, uvpbsplinesurf
+
Syntax:
+
~~~~{.php}
bsplinesurf name udegree nbuknots uknot umult ... nbvknot vknot
vmult ... x y z w ...
@@ -4322,7 +4644,8 @@ The syntax is similar to the *bsplinecurve* command. First give the degree in u
See *bsplinecurve* to compute the number of poles, the poles are first given in U as in the *beziersurf* command. You must give weights if the surface is rational.
-**Example:**
+**Example:**
+
~~~~{.php}
# create a bspline surface of degree 1 2
# with two knots in U and three in V
@@ -4336,9 +4659,10 @@ bsplinesurf s \
~~~~
-@subsubsection occt_draw_6_3_8 trim, trimu, trimv
+
Syntax:
+
~~~~{.php}
trim newname name [u1 u2 [v1 v2] [usense vsense]]
trimu newname name u1 u2 [usense]
@@ -4354,7 +4678,8 @@ After an initial trim, a second execution with no parameters given recreates the
**Note** that a trimmed curve or surface contains a copy of the basis geometry: modifying that will not modify the trimmed geometry. Trimming trimmed geometry will not create multiple levels of trimming. The basis geometry will be used.
-**Example:**
+**Example:**
+
~~~~{.php}
# create a 3d circle
circle c 0 0 0 10
@@ -4382,9 +4707,10 @@ cylinder cy 10
trimv cy cy 0 50
~~~~
-@subsubsection occt_draw_6_3_9 offset
+
Syntax:
+
~~~~{.php}
offset name basename distance [dx dy dz]
~~~~
@@ -4395,7 +4721,8 @@ The curve can be a 2d or a 3d curve. To compute the offsets for a 3d curve, you
The offset curve or surface copies the basic geometry, which can be modified later.
-**Example:**
+**Example:**
+
~~~~{.php}
# graphic demonstration that the outline of a torus
# is the offset of an ellipse
@@ -4408,9 +4735,10 @@ ellipse e 0 0 0 50 50*sin(angle)
offset l1 e 20 0 0 1
~~~~
-@subsubsection occt_draw_6_3_10 revsurf
+
Syntax:
+
~~~~{.php}
revsurf name curvename x y z dx dy dz
~~~~
@@ -4421,16 +4749,18 @@ A surface of revolution or revolved surface is obtained by rotating a curve (cal
To parameterize a surface of revolution: u is the angle of rotation around the axis. Its origin is given by the position of the meridian on the surface. v is the parameter of the meridian.
-**Example:**
+**Example:**
+
~~~~{.php}
# another way of creating a torus like surface
circle c 50 0 0 20
revsurf s c 0 0 0 0 1 0
~~~~
-@subsubsection occt_draw_6_3_11 extsurf
+
Syntax:
+
~~~~{.php}
extsurf newname curvename dx dy dz
~~~~
@@ -4441,7 +4771,8 @@ In the syntax, *dx,dy,dz* gives the direction of extrusion.
To parameterize a surface of extrusion: *u* is the parameter along the extruded curve; the *v* parameter is along the direction of extrusion.
-**Example:**
+**Example:**
+
~~~~{.php}
# an elliptic cylinder
ellipse e 0 0 0 10 5
@@ -4450,16 +4781,18 @@ extsurf s e 0 0 1
trimv s s 0 10
~~~~
-@subsubsection occt_draw_6_3_12 convert
+
Syntax:
+
~~~~{.php}
convert newname name
~~~~
Creates a 2d or 3d NURBS curve or a NURBS surface from any 2d curve, 3d curve or surface. In other words, conics, beziers and bsplines are turned into NURBS. Offsets are not processed.
-**Example:**
+**Example:**
+
~~~~{.php}
# turn a 2d arc of a circle into a 2d NURBS
circle c 0 0 5
@@ -4474,7 +4807,7 @@ convert p1 p
**Note** that offset curves and surfaces are not processed by this command.
-@subsection occt_draw_6_4 Curve and surface modifications
+
Draw provides commands to modify curves and surfaces, some of them are general, others restricted to bezier curves or bsplines.
@@ -4500,10 +4833,10 @@ Modifications for bspline:
-@subsubsection occt_draw_6_4_1 reverse, ureverse, vreverse
-
+
Syntax:
+
~~~~{.php}
reverse curvename
ureverse surfacename
@@ -4516,7 +4849,8 @@ The **reverse** command reverses the parameterization and inverses the orientati
Reversing a parameter on an analytical surface may create an indirect coordinate system.
-**Example:**
+**Example:**
+
~~~~{.php}
# reverse a trimmed 2d circle
circle c 0 0 5
@@ -4527,16 +4861,18 @@ reverse c
# 3*pi/2 and 7*pi/4 i.e. 2*pi-pi/2 and 2*pi-pi/4
~~~~
-@subsubsection occt_draw_6_4_2 exchuv
+
Syntax:
+
~~~~{.php}
exchuv surfacename
~~~~
For a bezier or bspline surface this command exchanges the u and v parameters.
-**Example:**
+**Example:**
+
~~~~{.php}
# exchanging u and v on a spline (made from a cylinder)
cylinder c 5
@@ -4545,9 +4881,10 @@ convert c1 c
exchuv c1
~~~~
-@subsubsection occt_draw_6_4_3 segment, segsur
+
Syntax:
+
~~~~{.php}
segment curve Ufirst Ulast
segsur surface Ufirst Ulast Vfirst Vlast
@@ -4559,16 +4896,18 @@ These commands modify the curve to restrict it between the new parameters: *Ufir
This command must not be confused with **trim** which creates a new geometry.
-**Example:**
+**Example:**
+
~~~~{.php}
# segment a bezier curve in half
beziercurve c 3 0 0 0 10 0 0 10 10 0
segment c ufirst ulast
~~~~
-@subsubsection occt_draw_6_4_4 iincudeg, incvdeg
+
Syntax:
+
~~~~{.php}
incudeg surfacename newdegree
incvdeg surfacename newdegree
@@ -4576,7 +4915,8 @@ incvdeg surfacename newdegree
**incudeg** and **incvdeg** increase the degree in the U or V parameter of a bezier or bspline surface.
-**Example:**
+**Example:**
+
~~~~{.php}
# make a planar bspline and increase the degree to 2 3
plane p
@@ -4589,9 +4929,10 @@ incvdeg p1 3
**Note** that the geometry is modified.
-@subsubsection occt_draw_6_4_5 cmovep, movep, movecolp, moverowp
+
Syntax:
+
~~~~{.php}
cmovep curve index dx dy [dz]
movep surface uindex vindex dx dy dz
@@ -4603,7 +4944,8 @@ moverowp surface vindex dx dy dz
* **cmovep** and **movep** translate one pole with a given index.
* **movecolp** and **moverowp** translate a whole column (expressed by the *uindex*) or row (expressed by the *vindex*) of poles.
-**Example:**
+**Example:**
+
~~~~{.php}
# start with a plane
# transform to bspline, raise degree and add relief
@@ -4617,9 +4959,10 @@ moverowp p1 2 0 0 5
movep p1 2 2 0 0 5
~~~~
-@subsubsection occt_draw_6_4_6 insertpole, rempole, remcolpole, remrowpole
+
Syntax:
+
~~~~{.php}
insertpole curvename index x y [z] [weight]
rempole curvename index
@@ -4633,7 +4976,8 @@ remrowpole surfacename index
**remcolpole** and **remrowpole** remove a column or a row of poles from a bezier surface. A column is in the v direction and a row in the u direction The resulting degree must be at least 1; i.e there will be two rows and two columns left.
-**Example:**
+**Example:**
+
~~~~{.php}
# start with a segment, insert a pole at end
# then remove the central pole
@@ -4642,9 +4986,10 @@ insertpole c 2 10 10 0
rempole c 2
~~~~
-@subsubsection occt_draw_6_4_7 insertknot, insertuknot, insertvknot
+
Syntax:
+
~~~~{.php}
insertknot name knot [mult = 1] [knot mult ...]
insertuknot surfacename knot mult
@@ -4655,7 +5000,8 @@ insertvknot surfacename knot mult
**insertuknot** and **insertvknot** insert knots in a surface.
-**Example:**
+**Example:**
+
~~~~{.php}
# create a cylindrical surface and insert a knot
cylinder c 10
@@ -4664,9 +5010,10 @@ convert c1 c
insertuknot c1 pi/4 1
~~~~
-@subsubsection occt_draw_6_4_8 remknot, remuknot, remvknot
+
Syntax:
+
~~~~{.php}
remknot index [mult] [tol]
remuknot index [mult] [tol]
@@ -4677,7 +5024,8 @@ remvknot index [mult] [tol]
By default, if no tolerance is given, the knot will always be removed.
-**Example:**
+**Example:**
+
~~~~{.php}
# bspline circle, remove a knot
circle c 0 0 5
@@ -4689,9 +5037,10 @@ remknot c1 2
**Note** that Curves or Surfaces may be modified.
-@subsubsection occt_draw_6_4_9 setperiodic, setnotperiodic, setuperiodic, setunotperiodic, setvperiodic, setvnotperiodic
+
Syntax:
+
~~~~{.php}
setperiodic curve
setnotperiodic curve
@@ -4705,7 +5054,8 @@ setvnotperiodic surface
**setuperiodic** and **setvperiodic** make the u or the v parameter of bspline surfaces periodic; **setunotperiodic**, and **setvnotperiodic** remove periodicity from the u or the v parameter of bspline surfaces.
-**Example:**
+**Example:**
+
~~~~{.php}
# a circle deperiodicized
circle c 0 0 5
@@ -4713,9 +5063,10 @@ convert c1 c
setnotperiodic c1
~~~~
-@subsubsection occt_draw_6_4_10 setorigin, setuorigin, setvorigin
+
Syntax:
+
~~~~{.php}
setorigin curvename index
setuorigin surfacename index
@@ -4724,7 +5075,8 @@ setuorigin surfacename index
These commands change the origin of the parameters on periodic curves or surfaces. The new origin must be an existing knot. To set an origin other than an existing knot, you must first insert one with the *insertknot* command.
-**Example:**
+**Example:**
+
~~~~{.php}
# a torus with new U and V origins
torus t 20 5
@@ -4734,13 +5086,14 @@ setvorigin t1 2
~~~~
-@subsection occt_draw_6_5 Transformations
+
Draw provides commands to apply linear transformations to geometric objects: they include translation, rotation, mirroring and scaling.
-@subsubsection occt_draw_6_5_1 translate, dtranslate
+
Syntax:
+
~~~~{.php}
translate name [names ...] dx dy dz
2dtranslate name [names ...] dx dy
@@ -4750,7 +5103,8 @@ The **Translate** command translates 3d points, curves and surfaces along a vect
For 2d points or curves, use the **2dtranslate** command.
-**Example:**
+**Example:**
+
~~~~{.php}
# 3d translation
point p 10 20 30
@@ -4762,9 +5116,10 @@ translate p c t 0 0 15
*NOTE*
*Objects are modified by this command.*
-@subsubsection occt_draw_6_5_2 rotate, 2drotate
+
Syntax:
+
~~~~{.php}
rotate name [name ...] x y z dx dy dz angle
2drotate name [name ...] x y angle
@@ -4774,7 +5129,8 @@ The **rotate** command rotates a 3d point curve or surface. You must give an axi
For a 2d rotation, you need only give the center point and the angle. In 2d or 3d, the angle can be negative.
-**Example:**
+**Example:**
+
~~~~{.php}
# make a helix of circles. create a script file with
this code and execute it using **source**.
@@ -4786,9 +5142,10 @@ rotate c$i 0 0 0 0 0 1 36
}
~~~~
-@subsubsection occt_draw_6_5_3 pmirror, lmirror, smirror, dpmirror, dlmirror
+
Syntax:
+
~~~~{.php}
pmirror name [names ...] x y z
lmirror name [names ...] x y z dx dy dz
@@ -4805,7 +5162,8 @@ The mirror commands perform a mirror transformation of 2d or 3d geometry.
* **2dpmirror** is the point mirror in 2D.
* **2dlmirror** is the axis symmetry mirror in 2D.
-**Example:**
+**Example:**
+
~~~~{.php}
# build 3 images of a torus
torus t 10 10 10 1 2 3 5 1
@@ -4817,9 +5175,10 @@ copy t t3
smirror t3 0 0 0 1 0 0
~~~~
-@subsubsection occt_draw_6_5_4 pscale, dpscale
+
Syntax:
+
~~~~{.php}
pscale name [name ...] x y z s
2dpscale name [name ...] x y s
@@ -4828,14 +5187,15 @@ pscale name [name ...] x y z s
The **pscale** and **2dpscale** commands transform an object by point scaling. You must give the center and the scaling factor. Because other scalings modify the type of the object, they are not provided. For example, a sphere may be transformed into an ellipsoid. Using a scaling factor of -1 is similar to using **pmirror**.
-**Example:**
+**Example:**
+
~~~~{.php}
# double the size of a sphere
sphere s 0 0 0 10
pscale s 0 0 0 2
~~~~
-@subsection occt_draw_6_6 Curve and surface analysis
+
**Draw** provides methods to compute information about curves and surfaces:
@@ -4847,16 +5207,18 @@ pscale s 0 0 0 2
* **proj** and **2dproj** to project a point on a curve or a surface.
* **surface_radius** to compute the curvature on a surface.
-@subsubsection occt_draw_6_6_1 coord
+
Syntax:
+
~~~~{.php}
coord P x y [z]
~~~~
Sets the x, y (and optionally z) coordinates of the point P.
-**Example:**
+**Example:**
+
~~~~{.php}
# translate a point
point p 10 5 5
@@ -4866,9 +5228,10 @@ coord p x y z
~~~~
-@subsubsection occt_draw_6_6_2 cvalue, 2dcvalue
+
Syntax:
+
~~~~{.php}
cvalue curve U x y z [d1x d1y d1z [d2x d2y d2z]]
2dcvalue curve U x y [d1x d1y [d2x d2y]]
@@ -4878,7 +5241,7 @@ For a curve at a given parameter, and depending on the number of arguments, **cv
**Example:**
-Let on a bezier curve at parameter 0 the point is the first pole; the first derivative is the vector to the second pole multiplied by the degree; the second derivative is the difference first to the second pole, second to the third pole multiplied by *degree-1* :
+Let on a bezier curve at parameter 0 the point is the first pole; the first derivative is the vector to the second pole multiplied by the degree; the second derivative is the difference first to the second pole, second to the third pole multiplied by *degree-1* :
~~~~{.php}
2dbeziercurve c 4 0 0 1 1 2 1 3 0
@@ -4888,16 +5251,18 @@ Let on a bezier curve at parameter 0 the point is the first pole; the first deri
# are 0 0 3 3 0 -6
~~~~
-@subsubsection occt_draw_6_6_3 svalue
+
Syntax:
+
~~~~{.php}
svalue surfname U v x y z [dux duy duz dvx dvy dvz [d2ux d2uy d2uz d2vx d2vy d2vz d2uvx d2uvy d2uvz]]
~~~~
Computes points and derivatives on a surface for a pair of parameter values. The result depends on the number of arguments. You can compute the first and the second derivatives.
-**Example:**
+**Example:**
+
~~~~{.php}
# display points on a sphere
sphere s 10
@@ -4907,9 +5272,10 @@ point . x y z
}
~~~~
-@subsubsection occt_draw_6_6_4 localprop, minmaxcurandinf
+
Syntax:
+
~~~~{.php}
localprop curvename U
minmaxcurandinf curve
@@ -4918,7 +5284,8 @@ minmaxcurandinf curve
**localprop** computes the curvature of a curve.
**minmaxcurandinf** computes and prints the parameters of the points where the curvature is minimum and maximum on a 2d curve.
-**Example:**
+**Example:**
+
~~~~{.php}
# show curvature at the center of a bezier curve
beziercurve c 3 0 0 0 10 2 0 20 0 0
@@ -4926,16 +5293,18 @@ localprop c 0.5
== Curvature : 0.02
~~~~
-@subsubsection occt_draw_6_6_5 parameters
+
Syntax:
+
~~~~{.php}
parameters surf/curve x y z U [V]
~~~~
Returns the parameters on the surface of the 3d point *x,y,z* in variables *u* and *v*. This command may only be used on analytical surfaces: plane, cylinder, cone, sphere and torus.
-**Example:**
+**Example:**
+
~~~~{.php}
# Compute parameters on a plane
plane p 0 0 10 1 1 0
@@ -4943,9 +5312,10 @@ parameters p 5 5 5 u v
# the values of u and v are : 0 5
~~~~
-@subsubsection occt_draw_6_6_6 proj, 2dproj
+
Syntax:
+
~~~~{.php}
proj name x y z
2dproj name xy
@@ -4957,7 +5327,7 @@ The command will compute and display all points in the projection. The lines joi
**Example:**
-Let us project a point on a torus
+Let us project a point on a torus
~~~~{.php}
torus t 20 5
@@ -4965,9 +5335,10 @@ proj t 30 10 7
== ext_1 ext_2 ext_3 ext_4
~~~~
-@subsubsection occt_draw_6_6_7 surface_radius
+
Syntax:
+
~~~~{.php}
surface_radius surface u v [c1 c2]
~~~~
@@ -4986,22 +5357,24 @@ surface_radius c pi 3 c1 c2
~~~~
-@subsection occt_draw_6_7 Intersections
+
* **intersect** computes intersections of surfaces;
* **2dintersect** computes intersections of 2d curves.
* **intconcon** computes intersections of 2d conic curves.
-@subsubsection occt_draw_6_7_1 intersect
+
Syntax:
+
~~~~{.php}
intersect name surface1 surface2
~~~~
Intersects two surfaces; if there is one intersection curve it will be named *name*, if there are more than one they will be named *name_1*, *name_2*, ...
-**Example:**
+**Example:**
+
~~~~{.php}
# create an ellipse
cone c 45 0
@@ -5009,9 +5382,10 @@ plane p 0 0 40 0 1 5
intersect e c p
~~~~
-@subsubsection occt_draw_6_7_2 2dintersect
+
Syntax:
+
~~~~{.php}
2dintersect curve1 [curve2] [-tol tol] [-state]
~~~~
@@ -5021,7 +5395,8 @@ Options:
-tol - allows changing the intersection tolerance (default value is 1.e-3);
-state - allows printing the intersection state for each point.
-**Example:**
+**Example:**
+
~~~~{.php}
# intersect two 2d ellipses
ellipse e1 0 0 5 2
@@ -5029,9 +5404,10 @@ ellipse e2 0 0 0 1 5 2
2dintersect e1 e2 -tol 1.e-10 -state
~~~~
-@subsubsection occt_draw_6_7_3 intconcon
+
Syntax:
+
~~~~{.php}
intconcon curve1 curve2
~~~~
@@ -5040,7 +5416,8 @@ Displays the intersection points between two 2d curves.
Curves must be only conic sections: 2d lines, circles, ellipses,
hyperbolas, parabolas. The algorithm from *IntAna2d_AnaIntersection* is used.
-**Example:**
+**Example:**
+
~~~~{.php}
# intersect two 2d ellipses
ellipse e1 0 0 5 2
@@ -5048,7 +5425,7 @@ ellipse e2 0 0 0 1 5 2
intconcon e1 e2
~~~~
-@subsection occt_draw_6_8 Approximations
+
Draw provides command to create curves and surfaces by approximation.
@@ -5058,9 +5435,10 @@ Draw provides command to create curves and surfaces by approximation.
* **surfint** fit a surface through 3d points by interpolation;
* **2dinterpole** interpolates a curve.
-@subsubsection occt_draw_6_8_1 appro, dapprox
+
Syntax:
+
~~~~{.php}
appro result nbpoint [curve]
2dapprox result nbpoint [curve / x1 y1 x2 y2]
@@ -5070,16 +5448,16 @@ These commands fit a curve through a set of points. First give the number of poi
**Example:**
-Let us pick points and they will be fitted
+Let us pick points and they will be fitted
~~~~{.php}
2dapprox c 10
~~~~
-@subsubsection occt_draw_6_8_2 surfapp, grilapp, surfint
-
+
Syntax:
+
~~~~{.php}
surfapp name nbupoints nbvpoints x y z ....
or
@@ -5099,7 +5477,8 @@ Optional parameter **periodic_flag** allows to get correct periodical surfaces i
U direction of result surface corresponds columns of initial array of points.
If **periodic_flag** = 1, algorithm uses first row of array as last row and builds periodical surface.
-**Example:**
+**Example:**
+
~~~~{.php}
# a surface using the same data as in the beziersurf
example sect 4.4
@@ -5110,17 +5489,18 @@ surfapp s 3 4 \
0 30 0 10 30 0 20 30 0
~~~~
-@subsection occt_draw_6_9 Projections
+
Draw provides commands to project points/curves on curves/surfaces.
-* **proj** projects point on the curve/surface (see @ref occt_draw_6_6_6 "proj command description");
-* **project** projects 3D curve on the surface (see @ref occt_draw_6_2_11 "project command description");
+* **proj** projects point on the curve/surface (see [proj command description](#occt_draw_6_6_6));
+* **project** projects 3D curve on the surface (see [project command description](#occt_draw_6_2_11));
* **projponf** projects point on the face.
-@subsubsection occt_draw_6_9_1 projponf
+
Syntax:
+
~~~~{.php}
projponf face pnt [extrema flag: -min/-max/-minmax] [extrema algo: -g(grad)/-t(tree)]
~~~~
@@ -5136,6 +5516,7 @@ You can change the Extrema options:
-minmax - to look for MinMax solutions.
**Example**
+
~~~~{.php}
plane p 0 0 0 0 0 1
mkface f p
@@ -5147,15 +5528,16 @@ projponf f pnt
# pproj = 5 5 0
~~~~
-@subsection occt_draw_6_10 Constraints
+
* **cirtang** constructs 2d circles tangent to curves;
* **lintan** constructs 2d lines tangent to curves.
-@subsubsection occt_draw_6_10_1 cirtang
+
Syntax:
+
~~~~{.php}
cirtang result [-t ] -c -p -r ...
~~~~
@@ -5167,7 +5549,8 @@ Builds all circles satisfying the condition:
Only following set of input data is supported: Curve-Curve-Curve, Curve-Curve-Point, Curve-Curve-Radius, Curve-Point-Point, Curve-Point-Radius, Point-Point-Point, Point-Point-Radius. The solutions will be stored in variables *result_1*, *result_2*, etc.
-**Example:**
+**Example:**
+
~~~~{.php}
# a point, a line and a radius. 2 solutions of type Curve-Point-Radius (C-P-R)
point p 0 0
@@ -5178,7 +5561,8 @@ cirtang c -p p -c l -r 4
Additionally it is possible to create a circle(s) with given center and tangent to the given curve (Curve-Point type).
-**Example:**
+**Example:**
+
~~~~{.php}
point pp 1 1
2dbsplinecurve cc 1 2 0 2 1 2 -10 -5 1 10 -5 1
@@ -5186,16 +5570,18 @@ cirtang r -p pp -c cc
== Solution of type C-P is: r_1 r_2
~~~~
-@subsubsection occt_draw_6_10_2 lintan
+
Syntax:
+
~~~~{.php}
lintan name curve curve [angle]
~~~~
Builds all 2d lines tangent to two curves. If the third angle argument is given the second curve must be a line and **lintan** will build all lines tangent to the first curve and forming the given angle with the line. The angle is given in degrees. The solutions are named *name_1*, *name_2*, etc.
-**Example:**
+**Example:**
+
~~~~{.php}
# lines tangent to 2 circles, 4 solutions
circle c1 -10 0 10
@@ -5209,7 +5595,7 @@ line l 2 0 1 1
lintan l1 c1 l 15
~~~~
-@subsection occt_draw_6_11 Display
+
Draw provides commands to control the display of geometric objects. Some display parameters are used for all objects, others are valid for surfaces only, some for bezier and bspline only, and others for bspline only.
@@ -5222,9 +5608,10 @@ On bezier and bspline curve and surface you can toggle the display of the contro
On bspline curves and surfaces you can toggle the display of the knots with the **shknots** and **clknots** commands.
-@subsubsection occt_draw_6_11_1 dmod, discr, defle
+
Syntax:
+
~~~~{.php}
dmode name [name ...] u/d
discr name [name ...] nbintervals
@@ -5239,7 +5626,8 @@ In *d*, or discretization mode, a fixed number of points is computed. This numbe
If the curve or the isolines seem to present too many angles, you can either increase the discretization or lower the deflection, depending on the mode. This will increase the number of points.
-**Example:**
+**Example:**
+
~~~~{.php}
# increment the number of points on a big circle
circle c 0 0 50 50
@@ -5249,9 +5637,10 @@ discr 100
dmode c u
~~~~
-@subsubsection occt_draw_6_11_2 nbiso
+
Syntax:
+
~~~~{.php}
nbiso name [names...] nuiso nviso
~~~~
@@ -5261,14 +5650,16 @@ Changes the number of isoparametric curves displayed on a surface in the U and V
**Example:**
Let us display 35 meridians and 15 parallels on a sphere:
+
~~~~{.php}
sphere s 20
nbiso s 35 15
~~~~
-@subsubsection occt_draw_6_11_3 clpoles, shpoles
+
Syntax:
+
~~~~{.php}
clpoles name
shpoles name
@@ -5278,16 +5669,17 @@ On bezier and bspline curves and surfaces, the control polygon is displayed by d
**Example:**
-Let us make a bezier curve and erase the poles
+Let us make a bezier curve and erase the poles
~~~~{.php}
beziercurve c 3 0 0 0 10 0 0 10 10 0
clpoles c
~~~~
-@subsubsection occt_draw_6_11_4 clknots, shknots
+
Syntax:
+
~~~~{.php}
clknots name
shknots name
@@ -5295,7 +5687,8 @@ shknots name
By default, knots on a bspline curve or surface are displayed with markers at the points with parametric value equal to the knots. *clknots* removes them and *shknots* restores them.
-**Example:**
+**Example:**
+
~~~~{.php}
# hide the knots on a bspline curve
bsplinecurve bc 2 3 0 3 1 1 2 3 \
@@ -5304,7 +5697,7 @@ clknots bc
~~~~
-@section occt_draw_7 Topology commands
+
Draw provides a set of commands to test OCCT Topology libraries. The Draw commands are found in the DRAWEXE executable or in any executable including the BRepTest commands.
@@ -5338,7 +5731,7 @@ The following topics are covered in the eight sections of this chapter:
* Analysis of shapes.
-@subsection occt_draw_7_1 Basic topology
+
The set of basic commands allows simple operations on shapes, or step-by-step construction of objects. These commands are useful for analysis of shape structure and include:
@@ -5354,9 +5747,10 @@ In Draw, shapes are displayed using isoparametric curves. There is color coding
* a yellow edge is a shared edge, which belongs to at least two faces.
-@subsubsection occt_draw_7_1_1 isos, discretisation
+
Syntax:
+
~~~~{.php}
isos [name ...][nbisos]
discretisation nbpoints
@@ -5368,7 +5762,8 @@ The same number is used for the u and v directions. With no arguments, *isos* pr
*discretisation* changes the default number of points used to display the curves. The default value is 30.
-**Example:**
+**Example:**
+
~~~~{.php}
# Display only the edges (the wireframe)
isos 0
@@ -5377,9 +5772,10 @@ isos 0
**Warning**: don’t confuse *isos* and *discretisation* with the geometric commands *nbisos* and *discr*.
-@subsubsection occt_draw_7_1_2 orientation, complement, invert, normals, range
+
Syntax:
+
~~~~{.php}
orientation name [name ...] F/R/E/I
complement name [name ...]
@@ -5394,7 +5790,8 @@ range name value value
* *normals** -- returns the assignment of colors to orientation values.
* **range** -- defines the length of a selected edge by defining the values of a starting point and an end point.
-**Example:**
+**Example:**
+
~~~~{.php}
# to invert normals of a box
box b 10 20 30
@@ -5414,9 +5811,10 @@ and finishing at 1
range e 0 1
~~~~
-@subsubsection occt_draw_7_1_3 explode, exwire, nbshapes
+
Syntax:
+
~~~~{.php}
explode name [C/So/Sh/F/W/E/V]
exwire name
@@ -5431,7 +5829,8 @@ With name only, **explode** will extract the first sublevel of shapes: the shell
**nbshapes** counts the number of shapes of each type in an entity.
-**Example:**
+**Example:**
+
~~~~{.php}
# on a box
box b 10 20 30
@@ -5465,9 +5864,10 @@ COMPOUND : 0
SHAPE : 34
~~~~
-@subsubsection occt_draw_7_1_4 emptycopy, add, compound
+
Syntax:
+
~~~~{.php}
emptycopy [newname] name
add name toname
@@ -5490,7 +5890,8 @@ compound [name ...] compoundname
On the other hand, **compound** is a safe way to achieve a similar result. It creates a compound from shapes. If no shapes are given, the compound is empty.
-**Example:**
+**Example:**
+
~~~~{.php}
# a compound with three boxes
box b1 0 0 0 1 1 1
@@ -5500,9 +5901,10 @@ compound b1 b2 b3 c
~~~~
-@subsubsection occt_draw_7_1_5 compare
+
Syntax:
+
~~~~{.php}
compare shape1 shape2
~~~~
@@ -5510,6 +5912,7 @@ compare shape1 shape2
**compare** compares the two shapes *shape1* and *shape2* using the methods *TopoDS_Shape::IsSame()* and *TopoDS_Shape::IsEqual()*.
**Example**
+
~~~~{.php}
box b1 1 1 1
copy b1 b2
@@ -5526,9 +5929,10 @@ compare b1 b2
# shapes are not same
~~~~
-@subsubsection occt_draw_7_1_6 issubshape
+
Syntax:
+
~~~~{.php}
issubshape subshape shape
~~~~
@@ -5536,6 +5940,7 @@ issubshape subshape shape
**issubshape** checks if the shape *subshape* is sub-shape of the shape *shape* and gets its index in the shape.
**Example**
+
~~~~{.php}
box b 1 1 1
explode b f
@@ -5544,7 +5949,7 @@ issubshape b_2 b
~~~~
-@subsection occt_draw_7_2 Curve and surface topology
+
This group of commands is used to create topology from shapes and to extract shapes from geometry.
@@ -5556,37 +5961,42 @@ This group of commands is used to create topology from shapes and to extract sha
* To extract the 2d curves from edges or faces, use the **pcurve** command.
-@subsubsection occt_draw_7_2_1 vertex
+
Syntax:
+
~~~~{.php}
vertex name [x y z / p edge]
~~~~
Creates a vertex at either a 3d location x,y,z or the point at parameter p on an edge.
-**Example:**
+**Example:**
+
~~~~{.php}
vertex v1 10 20 30
~~~~
-@subsubsection occt_draw_7_2_1a mkpoint
+
Syntax:
+
~~~~{.php}
mkpoint name vertex
~~~~
Creates a point from the coordinates of a given vertex.
-**Example:**
+**Example:**
+
~~~~{.php}
mkpoint p v1
~~~~
-@subsubsection occt_draw_7_2_2 edge, mkedge, uisoedge, visoedge
+
Syntax:
+
~~~~{.php}
edge name vertex1 vertex2
mkedge edge curve [surface] [pfirst plast] [vfirst [pfirst] vlast [plast]]
@@ -5597,7 +6007,8 @@ visoedge edge face v u1 u2
* **edge** creates a straight line edge between two vertices.
* **mkedge** generates edges from curves<.Two parameters can be given for the vertices: the first and last parameters of the curve are given by default. Vertices can also be given with their parameters, this option allows blocking the creation of new vertices. If the parameters of the vertices are not given, they are computed by projection on the curve. Instead of a 3d curve, a 2d curve and a surface can be given.
-**Example:**
+**Example:**
+
~~~~{.php}
# straight line edge
vertex v1 10 0 0
@@ -5616,7 +6027,8 @@ mkedge e2 c
* **visoedge** and **uisoedge** are commands that generate a *uiso* parameter edge or a *viso* parameter edge.
-**Example:**
+**Example:**
+
~~~~{.php}
# to create an edge between v1 and v2 at point u
# to create the example plane
@@ -5633,9 +6045,10 @@ mkface p p
uisoedge e p 0.5 0.20 0.8
~~~~
-@subsubsection occt_draw_7_2_3 wire, polyline, polyvertex
+
Syntax:
+
~~~~{.php}
wire wirename e1/w1 [e2/w2 ...]
polyline name x1 y1 z1 x2 y2 z2 ...
@@ -5648,7 +6061,8 @@ polyvertex name v1 v2 ...
**polyvertex** creates a polygonal wire from vertices.
-**Example:**
+**Example:**
+
~~~~{.php}
# create two polygonal wires
# glue them and define as a single wire
@@ -5657,9 +6071,10 @@ polyline w2 10 10 0 0 10 0 0 0 0
wire w w1 w2
~~~~
-@subsubsection occt_draw_7_2_4 profile
+
+
+Syntax
-Syntax
~~~~{.php}
profile name [code values] [code values] ...
~~~~
@@ -5702,14 +6117,16 @@ The profile shape definition is the suffix; no suffix produces a face, *w* is a
Code letters are not case-sensitive.
-**Example:**
+**Example:**
+
~~~~{.php}
# to create a triangular plane using a vertex at the
origin, in the xy plane
profile p O 0 0 0 X 1 Y 0 x 1 y 1
~~~~
-**Example:**
+**Example:**
+
~~~~{.php}
# to create a contour using the different code
possibilities
@@ -5751,9 +6168,10 @@ profile p F 1 0 x 2 y 1 c 1 45 l 1 tt 1.5 1.5 xx 0.2 yy 2 c 1 290 ix 0 r 90 ix -
profile p F 1 0 x 2 y 1 c 1 45 l 1 tt 1.5 1.5 xx 0.2 yy 2 c 1 290 ix 0 r 90 ix -0.3
~~~~
-@subsubsection occt_draw_7_2_5 bsplineprof
+
Syntax:
+
~~~~{.php}
bsplineprof name [S face] [W WW]
~~~~
@@ -5767,7 +6185,8 @@ Builds a profile in the XY plane from digitizes. By default the profile is close
The profile shape definition is the suffix; no suffix produces a face, **w** is a closed wire, **ww** is an open wire.
-**Example:**
+**Example:**
+
~~~~{.php}
#to view the xy plane
top
@@ -5783,12 +6202,13 @@ bsplineprof res
# click mb3 to create the face
~~~~
-@subsubsection occt_draw_7_2_6 mkoffset
+
**mkoffset** creates a parallel wire in the same plane using a face or an existing continuous set of wires as a reference. The number of occurrences is not limited.
The offset distance defines the spacing and the positioning of the occurrences.
Syntax:
+
~~~~{.php}
mkoffset result shape nboffset stepoffset [jointype(a/i) [alt]]
~~~~
@@ -5801,7 +6221,8 @@ Where:
* *alt* - altitude from the plane of the input face in relation to the normal to the face.
-**Example:**
+**Example:**
+
~~~~{.php}
# Create a box and select a face
box b 1 2 3
@@ -5820,7 +6241,8 @@ mkoffset r b_1 1 -0.4
**Note** that on a concave input contour for an interior step *mkoffset* command may produce several wires which will be contained in a single compound.
-**Example:**
+**Example:**
+
~~~~{.php}
# to create the example contour
profile p F 0 0 x 2 y 4 tt 1 1 tt 0 4 w
@@ -5832,9 +6254,10 @@ mkoffset r p 1 -0.55
# r_1 is a compound of two wires
~~~~
-@subsubsection occt_draw_7_2_7 mkplane, mkface
+
Syntax:
+
~~~~{.php}
mkplane name wire
mkface name surface [ufirst ulast vfirst vlast]
@@ -5844,7 +6267,8 @@ mkface name surface [ufirst ulast vfirst vlast]
**mkface** generates a face from a surface. Parameter values can be given to trim a rectangular area. The default boundaries are those of the surface.
-**Example:**
+**Example:**
+
~~~~{.php}
# make a polygonal face
polyline f 0 0 0 20 0 0 20 10 0 10 10 0 10 20 0 0 20 0 0 0 0
@@ -5856,9 +6280,10 @@ trim g g -pi/3 pi/2 0 15
mkface g g
~~~~
-@subsubsection occt_draw_7_2_8 mkcurve, mksurface
+
Syntax:
+
~~~~{.php}
mkcurve curve edge
mksurface name face
@@ -5868,7 +6293,8 @@ mksurface name face
**mksurface** creates a surface from a face. The surface will not be trimmed.
-**Example:**
+**Example:**
+
~~~~{.php}
# make a line
vertex v1 0 0 0
@@ -5876,7 +6302,7 @@ vertex v2 10 0 0
edge e v1 v2
~~~~
-@subsubsection occt_draw_7_2_9 pcurve
+
Syntax:
@@ -5886,7 +6312,8 @@ pcurve [name edgename] facename
Extracts the 2d curve of an edge on a face. If only the face is specified, the command extracts all the curves and colors them according to their orientation. This is useful in checking to see if the edges in a face are correctly oriented, i.e. they turn counter-clockwise. To make curves visible, use a fitted 2d view.
-**Example:**
+**Example:**
+
~~~~{.php}
# view the pcurves of a face
plane p
@@ -5897,9 +6324,10 @@ pcurve p
2dfit
~~~~
-@subsubsection occt_draw_7_2_10 chfi2d
+
Syntax:
+
~~~~{.php}
chfi2d result face [edge1 edge2 (F radius/CDD d1 d2/CDA d ang) ....
~~~~
@@ -5916,7 +6344,7 @@ The distance is the length value from the edge between the two selected faces in
**Example:**
-Let us create a 2d fillet:
+Let us create a 2d fillet:
~~~~{.php}
top
@@ -5929,7 +6357,7 @@ chfi2d cfr p . . F 0.3
~~~~
Let us create a 2d chamfer using two distances:
-
+
~~~~{.php}
profile p x 2 y 2 x -2
chfi2d cfr p . . CDD 0.3 0.6
@@ -5939,7 +6367,7 @@ chfi2d cfr p . . CDD 0.3 0.6
#select an edge
~~~~
-Let us create a 2d chamfer using a defined distance and angle
+Let us create a 2d chamfer using a defined distance and angle
~~~~{.php}
top
@@ -5951,9 +6379,10 @@ chfi2d cfr p . . CDA 0.3 75
#select an edge
~~~~
-@subsubsection occt_draw_7_2_11 nproject
+
Syntax:
+
~~~~{.php}
nproject pj e1 e2 e3 ... surf -g -d [dmax] [Tol
[continuity [maxdeg [maxseg]]]
@@ -5962,6 +6391,7 @@ nproject pj e1 e2 e3 ... surf -g -d [dmax] [Tol
Creates a shape projection which is normal to the target surface.
**Example:**
+
~~~~{.php}
# create a curved surface
line l 0 0 0 1 0 0
@@ -5990,7 +6420,7 @@ nproject r e p
~~~~
-@subsection occt_draw_7_3 Primitives
+
Primitive commands make it possible to create simple shapes. They include:
@@ -5999,9 +6429,10 @@ Primitive commands make it possible to create simple shapes. They include:
* **halfspace** command
-@subsubsection occt_draw_7_3_1 box, wedge
+
Syntax:
+
~~~~{.php}
box name [x y z] dx dy dz
wedge name dx dy dz ltx / xmin zmin xmax xmax
@@ -6013,7 +6444,8 @@ wedge name dx dy dz ltx / xmin zmin xmax xmax
The other faces are defined between these faces. The face in the *y=yd* plane may be degenerated into a line if *ltx = 0*, or a point if *xmin = xmax* and *ymin = ymax*. In these cases, the line and the point both have 5 faces each. To position the wedge use the *ttranslate* and *trotate* commands.
-**Example:**
+**Example:**
+
~~~~{.php}
# a box at the origin
box b1 10 20 30
@@ -6031,9 +6463,10 @@ wedge w2 10 20 30 0
wedge w3 20 20 20 10 10 10 10
~~~~
-@subsubsection occt_draw_7_3_2 pcylinder, pcone, psphere, ptorus
+
Syntax:
+
~~~~{.php}
pcylinder name [plane] radius height [angle]
pcone name [plane] radius1 radius2 height [angle]
@@ -6052,7 +6485,8 @@ All these commands create solid blocks in the default coordinate system, using t
**ptorus** creates a solid torus with the given radii, centered on the origin, which is a point along the z axis. If two angles increasing in degree in the range 0 -- 360 are given, the solid will be bounded by two planar surfaces at those positions on the circle.
-**Example:**
+**Example:**
+
~~~~{.php}
# a can shape
pcylinder cy 5 10
@@ -6067,16 +6501,18 @@ psphere sp 10 270
ptorus to 20 5 0 90
~~~~
-@subsubsection occt_draw_7_3_3 halfspace
+
Syntax:
+
~~~~{.php}
halfspace result face/shell x y z
~~~~
**halfspace** creates an infinite solid volume based on a face in a defined direction. This volume can be used to perform the boolean operation of cutting a solid by a face or plane.
-**Example:**
+**Example:**
+
~~~~{.php}
box b 0 0 0 1 2 3
explode b f
@@ -6085,7 +6521,7 @@ halfspace hr b_3 0.5 0.5 0.5
~~~~
-@subsection occt_draw_7_4 Sweeping
+
Sweeping creates shapes by sweeping out a shape along a defined path:
@@ -6096,9 +6532,10 @@ Sweeping creates shapes by sweeping out a shape along a defined path:
* **thrusections** -- creates a sweep from wire in different planes.
-@subsubsection occt_draw_7_4_1 prism
+
Syntax:
+
~~~~{.php}
prism result base dx dy dz [Copy | Inf | SemiInf]
~~~~
@@ -6107,23 +6544,26 @@ Creates a new shape by sweeping a shape in a direction. Any shape can be swept:
The shape is swept along the vector *dx dy dz*. The original shape will be shared in the result unless *Copy* is specified. If *Inf* is specified the prism is infinite in both directions. If *SemiInf* is specified the prism is infinite in the *dx,dy,dz* direction, and the length of the vector has no importance.
-**Example:**
+**Example:**
+
~~~~{.php}
# sweep a planar face to make a solid
polyline f 0 0 0 10 0 0 10 5 0 5 5 0 5 15 0 0 15 0 0 0 0
mkplane f f
~~~~
-@subsubsection occt_draw_7_4_2 revol
+
Syntax:
+
~~~~{.php}
revol result base x y z dx dy dz angle [Copy]
~~~~
Creates a new shape by sweeping a base shape through an angle along the axis *x,y,z dx,dy,dz*. As with the prism command, the shape can be of any type and is not shared if *Copy* is specified.
-**Example:**
+**Example:**
+
~~~~{.php}
# shell by wire rotation
polyline w 0 0 0 10 0 0 10 5 0 5 5 0 5 15 0 0 15 0
@@ -6131,16 +6571,18 @@ revol s w 20 0 0 0 1 0 90
~~~~
-@subsubsection occt_draw_7_4_3 pipe
+
Syntax:
+
~~~~{.php}
pipe name wire_spine Profile
~~~~
Creates a new shape by sweeping a shape known as the profile along a wire known as the spine.
-**Example:**
+**Example:**
+
~~~~{.php}
# sweep a circle along a bezier curve to make a solid
pipe
@@ -6155,9 +6597,10 @@ mkplane profile profile
pipe p spine profile
~~~~
-@subsubsection occt_draw_7_4_4 mksweep, addsweep, setsweep, deletesweep, buildsweep, simulsweep
+
Syntax:
+
~~~~{.php}
mksweep wire
addsweep wire[vertex][-M][-C] [auxiilaryshape]
@@ -6185,7 +6628,8 @@ At least one other wire is used to define the sweep profile.
* **simulsweep** -- can be used to create a preview of the shape. [n] is the number of sections that are used to simulate the sweep.
* **buildsweep** -- creates the sweep using the arguments defined by all the commands.
-**Example:**
+**Example:**
+
~~~~{.php}
#create a sweep based on a semi-circular wire using the
Frenet algorithm
@@ -6207,9 +6651,10 @@ addsweep w -R
simulsweep w 3
~~~~
-@subsubsection occt_draw_7_4_5 thrusections
+
Syntax:
+
~~~~{.php}
thrusections [-N] result issolid isruled wire1 wire2 [..wire..]
~~~~
@@ -6217,7 +6662,8 @@ thrusections [-N] result issolid isruled wire1 wire2 [..wire..]
**thrusections** creates a shape using wires that are positioned in different planes. Each wire selected must have the same number of edges and vertices.
A bezier curve is generated between the vertices of each wire. The option *[-N]* means that no check is made on wires for direction.
-**Example:**
+**Example:**
+
~~~~{.php}
#create three wires in three planes
polyline w1 0 0 0 5 0 0 5 5 0 2 3 0
@@ -6231,7 +6677,7 @@ Tolerances obtenues -- 3d : 0
~~~~
-@subsection occt_draw_7_5 Topological transformation
+
Transformations are applications of matrices. When the transformation is nondeforming, such as translation or rotation, the object is not copied. The topology localcoordinate system feature is used. The copy can be enforced with the **tcopy** command.
@@ -6240,16 +6686,18 @@ Transformations are applications of matrices. When the transformation is nondefo
* **tmirror** and **tscale** -- always modify the shape.
-@subsubsection occt_draw_7_5_1 tcopy
+
Syntax:
+
~~~~{.php}
tcopy name toname [name toname ...]
~~~~
Copies the structure of one shape, including the geometry, into another, newer shape.
-**Example:**
+**Example:**
+
~~~~{.php}
# create an edge from a curve and copy it
beziercurve c 3 0 0 0 10 0 0 20 10 0
@@ -6260,9 +6708,10 @@ ttranslate e2 0 5 0
# now modify the curve, only e1 and e2 will be modified
~~~~
-@subsubsection occt_draw_7_5_2 tmove, treset
+
Syntax:
+
~~~~{.php}
tmove name [name ...] shape
reset name [name ...]
@@ -6272,7 +6721,8 @@ reset name [name ...]
**tmove** applies the location of a given shape to other shapes. **reset** restores one or several shapes it to its or their original coordinate system(s).
-**Example:**
+**Example:**
+
~~~~{.php}
# create two boxes
box b1 10 10 10
@@ -6285,9 +6735,10 @@ tmove b2 b1
reset b1 b2
~~~~
-@subsubsection occt_draw_7_5_3 ttranslate, trotate
+
Syntax:
+
~~~~{.php}
ttranslate [name ...] dx dy dz
trotate [name ...] x y z dx dy dz angle
@@ -6298,7 +6749,8 @@ When creating multiple shapes, the same location is used for all the shapes. (Se
Locations are very economic in the data structure because multiple occurrences of an object share the topological description.
-**Example:**
+**Example:**
+
~~~~{.php}
# make rotated copies of a sphere in between two cylinders
# create a file source toto.tcl
@@ -6321,9 +6773,10 @@ ttranslate s 25 0 12.5
source toto.tcl
~~~~
-@subsubsection occt_draw_7_5_4 tmirror, tscale
+
Syntax:
+
~~~~{.php}
tmirror name x y z dx dy dz
tscale name x y z scale
@@ -6333,7 +6786,8 @@ tscale name x y z scale
* **Tscale** applies a central homotopic mapping to a shape.
-**Example:**
+**Example:**
+
~~~~{.php}
# mirror a portion of cylinder about the YZ plane
pcylinder c1 10 10 270
@@ -6344,17 +6798,19 @@ tscale c1 0 0 0 0.5
~~~~
-@subsection occt_draw_7_6 Sewing
+
**sewing** joins two or more shapes.
Syntax:
+
~~~~{.php}
sewing result [tolerance] shape1 shape2 ...
~~~~
**Sewing** joins shapes by connecting their adjacent or near adjacent edges. Adjacency can be redefined by modifying the tolerance value.
-**Example:**
+**Example:**
+
~~~~{.php}
# create two adjacent boxes
box b 0 0 0 1 2 3
@@ -6365,16 +6821,16 @@ sr is a shape COMPOUND FORWARD Free Modified
~~~~
-@subsection occt_draw_7_7 Topological operations
+
The new algorithm of Boolean operations avoids a large number of weak points and limitations presented in the old Boolean operation algorithm.
It also provides wider range of options and diagnostics.
-The algorithms of Boolean component are fully described in the @ref specification__boolean_operations "Boolean Operations" of boolean operation user guide.
+The algorithms of Boolean component are fully described in the [Boolean Operations](boolean_operations#specification__boolean_operations) of boolean operation user guide.
-For the Draw commands to perform operations in Boolean component, read the dedicated section @ref occt_draw_bop "Boolean operations commands"
+For the Draw commands to perform operations in Boolean component, read the dedicated section [Boolean operations commands](#occt_draw_bop)
-@subsection occt_draw_7_8 Drafting and blending
+
Drafting is creation of a new shape by tilting faces through an angle.
@@ -6388,9 +6844,10 @@ Blending is the creation of a new shape by rounding edges to create a fillet.
* Use **buildevol**, **mkevol**, **updatevol** to realize varying radius blending.
-@subsubsection occt_draw_7_8_1 depouille
+
Syntax:
+
~~~~{.php}
dep result shape dirx diry dirz face angle x y x dx dy dz [face angle...]
~~~~
@@ -6399,7 +6856,8 @@ Creates a new shape by drafting one or more faces of a shape.
Identify the shape(s) to be drafted, the drafting direction, and the face(s) with an angle and an axis of rotation for each face. You can use dot syntax to identify the faces.
-**Example:**
+**Example:**
+
~~~~{.php}
# draft a face of a box
box b 10 10 10
@@ -6409,9 +6867,10 @@ explode b f
dep a b 0 0 1 b_2 10 0 10 0 1 0 5
~~~~
-@subsubsection occt_draw_7_8_2 chamf
+
Syntax:
+
~~~~{.php}
chamf newname shape edge face S dist
chamf newname shape edge face dist1 dist2
@@ -6429,6 +6888,7 @@ Use the dot syntax to select the faces and edges.
**Examples:**
Let us create a chamfer based on equal distances from the edge (45 degree angle):
+
~~~~{.php}
# create a box
box b 1 2 3
@@ -6440,6 +6900,7 @@ chamf ch b . . S 0.5
~~~~
Let us create a chamfer based on different distances from the selected edge:
+
~~~~{.php}
box b 1 2 3
chamf ch b . . 0.3 0.4
@@ -6450,7 +6911,7 @@ chamf ch b . . 0.3 0.4
~~~~
Let us create a chamfer based on a distance from the edge and an angle:
-
+
~~~~{.php}
box b 1 2 3
chamf ch b . . A 0.4 30
@@ -6460,16 +6921,18 @@ chamf ch b . . A 0.4 30
# select an adjacent face
~~~~
-@subsubsection occt_draw_7_8_3 blend
+
Syntax:
+
~~~~{.php}
blend result object rad1 ed1 rad2 ed2 ... [R/Q/P]
~~~~
Creates a new shape by filleting the edges of an existing shape. The edge must be inside the shape. You may use the dot syntax. Note that the blend is propagated to the edges of tangential planar, cylindrical or conical faces.
-**Example:**
+**Example:**
+
~~~~{.php}
# blend a box, click on an edge
box b 20 20 20
@@ -6491,9 +6954,10 @@ blend b b 2 .
==- SetRegul 0s
~~~~
-@subsubsection occt_draw_7_8_4 bfuseblend
+
Syntax:
+
~~~~{.php}
bfuseblend name shape1 shape2 radius [-d]
~~~~
@@ -6502,6 +6966,7 @@ Creates a boolean fusion of two shapes and then blends (fillets) the intersectio
Option [-d] enables the Debugging mode in which the error messages, if any, will be printed.
**Example:**
+
~~~~{.php}
# fuse-blend two boxes
box b1 20 20 5
@@ -6510,9 +6975,10 @@ ttranslate b2 -10 10 3
bfuseblend a b1 b2 1
~~~~
-@subsubsection occt_draw_7_8_4a bcutblend
+
Syntax:
+
~~~~{.php}
bcutblend name shape1 shape2 radius [-d]
~~~~
@@ -6521,6 +6987,7 @@ Creates a boolean cut of two shapes and then blends (fillets) the intersection e
Option [-d] enables the Debugging mode in which the error messages, if any, will be printed.
**Example:**
+
~~~~{.php}
# cut-blend two boxes
box b1 20 20 5
@@ -6529,9 +6996,10 @@ ttranslate b2 -10 10 3
bcutblend a b1 b2 1
~~~~
-@subsubsection occt_draw_7_8_5 mkevol, updatevol, buildevol
+
Syntax:
+
~~~~{.php}
mkevol result object (then use updatevol) [R/Q/P]
updatevol edge u1 radius1 [u2 radius2 ...]
@@ -6544,7 +7012,8 @@ These three commands work together to create fillets with evolving radii.
* **updatevol** allows describing the filleted edges you want to create. For each edge, you give a set of coordinates: parameter and radius and the command prompts you to pick the edge of the shape which you want to modify. The parameters will be calculated along the edges and the radius function applied to the whole edge.
* **buildevol** produces the result described previously in **mkevol** and **updatevol**.
-**Example:**
+**Example:**
+
~~~~{.php}
# makes an evolved radius on a box
box b 10 10 10
@@ -6576,11 +7045,12 @@ buildevol
~~~~
-@subsection occt_draw_defeaturing Defeaturing
+
-Draw command **removefeatures** is intended for performing @ref occt_modalg_defeaturing "3D Model Defeaturing", i.e. it performs the removal of the requested features from the shape.
+Draw command **removefeatures** is intended for performing [3D Model Defeaturing](modeling_algos#occt_modalg_defeaturing), i.e. it performs the removal of the requested features from the shape.
Syntax:
+
~~~~{.php}
removefeatures result shape f1 f2 ... [-nohist] [-parallel]
~~~~
@@ -6595,20 +7065,21 @@ parallel - enables the parallel processing mode.
-@subsection occt_draw_makeperiodic 3D Model Periodicity
+
-Draw module for @ref occt_modalg_makeperiodic "making the shape periodic" includes the following commands:
+Draw module for [making the shape periodic](modeling_algos#occt_modalg_makeperiodic) includes the following commands:
* **makeperiodic** - makes the shape periodic in required directions;
* **repeatshape** - repeats the periodic shape in requested periodic direction;
* **periodictwins** - returns the periodic twins for the shape;
* **clearrepetitions** - clears all previous repetitions of the periodic shape.
-@subsubsection occt_draw_makeperiodic_makeperiodic makeperiodic
+
The command makes the shape periodic in the required directions with the required period.
If trimming is given it trims the shape to fit the requested period.
Syntax:
+
~~~~{.php}
makeperiodic result shape [-x/y/z period [-trim first]]
~~~~
@@ -6619,13 +7090,14 @@ shape - input shape to make it periodic:
-trim first - option to trim the shape to fit the required period, starting the period in first.
-@subsubsection occt_draw_makeperiodic_repeatshape repeatshape
+
The command repeats the periodic shape in periodic direction requested number of time.
The result contains the all the repeated shapes glued together.
The command should be called after **makeperiodic** command.
Syntax:
+
~~~~{.php}
repeatshape result -x/y/z times
~~~~
@@ -6634,13 +7106,14 @@ Where:
result - resulting shape;
-x/y/z times - direction for repetition and number of repetitions (negative number of times means the repetition in negative direction).
-@subsubsection occt_draw_makeperiodic_periodictwins periodictwins
+
For the given shape the command returns the identical shapes located on the opposite sides of the periodic direction.
All periodic twins should have the same geometry.
The command should be called after **makeperiodic** command.
Syntax:
+
~~~~{.php}
periodictwins twins shape
~~~~
@@ -6649,15 +7122,15 @@ twins - periodic twins for the given shape
shape - shape to find the twins for
-@subsubsection occt_draw_makeperiodic_clearrepetitions clearrepetitions
+
The command clears all previous repetitions of the periodic shape allowing to start the repetitions over.
No arguments are needed for the command.
-@subsection occt_draw_makeconnected Making the touching shapes connected
+
-Draw module for @ref occt_modalg_makeconnected "making the touching same-dimensional shapes connected" includes the following commands:
+Draw module for [making the touching same-dimensional shapes connected](modeling_algos#occt_modalg_makeconnected) includes the following commands:
* **makeconnected** - make the input shapes connected or glued, performs material associations;
* **cmaterialson** - returns the materials located on the requested side of a shape;
* **cmakeperiodic** - makes the connected shape periodic in requested directions;
@@ -6665,11 +7138,12 @@ Draw module for @ref occt_modalg_makeconnected "making the touching same-dimensi
* **cperiodictwins** - returns all periodic twins for the shape;
* **cclearrepetitions** - clears all previous repetitions of the periodic shape, keeping the shape periodic.
-@subsubsection occt_draw_makeconnected_makeconnected makeconnected
+
The command makes the input touching shapes connected.
Syntax:
+
~~~~{.php}
makeconnected result shape1 shape2 ...
~~~~
@@ -6678,12 +7152,13 @@ Where:
result - resulting connected shape.
shape1 shape2 ... - shapes to be made connected.
-@subsubsection occt_draw_makeconnected_cmaterialson cmaterialson
+
The command returns the materials located on the requested side of the shape.
The command should be called after the shapes have been made connected, i.e. after the command **makeconnected**.
Syntax:
+
~~~~{.php}
cmaterialson result +/- shape
~~~~
@@ -6693,12 +7168,13 @@ shape - shape for which the materials are needed
+/- - side of a given shape ('+' for positive side, '-' - for negative).
-@subsubsection occt_draw_makeconnected_cmakeperiodic cmakeperiodic
+
The command makes the connected shape periodic in the required directions with the required period.
The command should be called after the shapes have been made connected, i.e. after the command **makeconnected**.
Syntax:
+
~~~~{.php}
cmakeperiodic result [-x/y/z period [-trim first]]
~~~~
@@ -6709,12 +7185,13 @@ shape - input shape to make it periodic:
-trim first - option to trim the shape to fit the required period, starting the period in first.
-@subsubsection occt_draw_makeconnected_crepeatshape crepeatshape
+
The command repeats the connected periodic shape in the required periodic directions required number of times.
The command should be called after the shapes have been made connected and periodic, i.e. after the commands **makeconnected** and **cmakeperiodic**.
Syntax:
+
~~~~{.php}
crepeatshape result -x/y/z times
~~~~
@@ -6723,12 +7200,13 @@ result - resulting shape;
-x/y/z times - direction for repetition and number of repetitions (negative number of times means the repetition in negative direction).
-@subsubsection occt_draw_makeconnected_cperiodictwins cperiodictwins
+
The command returns all periodic twins for the shape.
The command should be called after the shapes have been made connected and periodic, i.e. after the commands **makeconnected** and **cmakeperiodic**.
Syntax:
+
~~~~{.php}
cperiodictwins twins shape
~~~~
@@ -6737,19 +7215,20 @@ Where:
twins - periodic twins of a shape.
shape - input shape.
-@subsubsection occt_draw_makeconnected_cclearrepetitions cclearrepetitions
+
The command clears all previous repetitions of the periodic shape keeping the shape periodic.
The command should be called after the shapes have been made connected, periodic and the repetitions have been applied to the periodic shape, i.e. after the commands **makeconnected**, **cmakeperiodic** and **crepeatshape**.
Otherwise the command will have no effect.
Syntax:
+
~~~~{.php}
cclearrepetitions [result]
~~~~
-@subsection occt_draw_7_9 Analysis of topology and geometry
+
Analysis of shapes includes commands to compute length, area, volumes and inertial properties, as well as to compute some aspects impacting shape validity.
@@ -6763,9 +7242,10 @@ Analysis of shapes includes commands to compute length, area, volumes and inerti
* Use **validrange** to check range of an edge not covered by vertices.
-@subsubsection occt_draw_7_9_1 lprops, sprops, vprops
+
Syntax:
+
~~~~{.php}
lprops shape [x y z] [-skip] [-full] [-tri]
sprops shape [epsilon] [c[losed]] [x y z] [-skip] [-full] [-tri]
@@ -6789,7 +7269,8 @@ If epsilon is given, exact geometry (curves, surfaces) are used for calculations
All three commands print the mass, the coordinates of the center of gravity, the matrix of inertia and the moments. Mass is either the length, the area or the volume. The center and the main axis of inertia are displayed.
-**Example:**
+**Example:**
+
~~~~{.php}
# volume of a cylinder
pcylinder c 10 20
@@ -6816,9 +7297,10 @@ I.Z = 314159.265357595
~~~~
-@subsubsection occt_draw_7_9_2 bounding
+
Syntax:
+
~~~~{.php}
bounding {-s shape | -c xmin ymin zmin xmax ymax zmax} [-obb] [-shape name] [-dump] [-notriangulation] [-perfmeter name NbIters] [-save xmin ymin zmin xmax ymax zmax] [-nodraw] [-optimal] [-exttoler]
~~~~
@@ -6830,7 +7312,8 @@ Generally, bounding boxes can be divided into two main types:
Detailed information about this command is available in DRAW help-system (enter "help bounding" in DRAW application).
-**Example 1: Creation of AABB with given corners**
+**Example 1: Creation of AABB with given corners**
+
~~~~{.php}
bounding -c 50 100 30 180 200 100 -shape result
# look at the box
@@ -6839,7 +7322,8 @@ vfit
vsetdispmode 1
~~~~
-**Example 2: Compare AABB and OBB**
+**Example 2: Compare AABB and OBB**
+
~~~~{.php}
# Create a torus and rotate it
ptorus t 20 5
@@ -6902,16 +7386,18 @@ vprops ro 1.0e-12
As we can see, the volume of OBB is significantly less than the volume of AABB.
-@subsubsection occt_draw_7_9_2a isbbinterf
+
Syntax:
+
~~~~{.php}
isbbinterf shape1 shape2 [-o]
~~~~
Checks whether the bounding boxes created from the given shapes are interfered. If "-o"-option is switched on then the oriented boxes will be checked. Otherwise, axis-aligned boxes will be checked.
-**Example 1: Not interfered AABB**
+**Example 1: Not interfered AABB**
+
~~~~{.php}
box b1 100 60 140 20 10 80
box b2 210 200 80 120 60 90
@@ -6919,7 +7405,8 @@ isbbinterf b1 b2
==The shapes are NOT interfered by AABB.
~~~~
-**Example 2: Interfered AABB**
+**Example 2: Interfered AABB**
+
~~~~{.php}
box b1 300 300 300
box b2 100 100 100 50 50 50
@@ -6927,7 +7414,8 @@ isbbinterf b1 b2
==The shapes are interfered by AABB.
~~~~
-**Example 3: Not interfered OBB**
+**Example 3: Not interfered OBB**
+
~~~~{.php}
box b1 100 150 200
copy b1 b2
@@ -6939,7 +7427,8 @@ isbbinterf b1 b2 -o
==The shapes are NOT interfered by OBB.
~~~~
-**Example 4: Interfered OBB**
+**Example 4: Interfered OBB**
+
~~~~{.php}
box b1 100 150 200
copy b1 b2
@@ -6951,16 +7440,18 @@ isbbinterf b1 b2 -o
==The shapes are interfered by OBB.
~~~~
-@subsubsection occt_draw_7_9_3 distmini
+
Syntax:
+
~~~~{.php}
distmini name Shape1 Shape2
~~~~
Calculates the minimum distance between two shapes. The calculation returns the number of solutions, if more than one solution exists. The options are displayed in the viewer in red and the results are listed in the shell window. The *distmini* lines are considered as shapes which have a value v.
-**Example:**
+**Example:**
+
~~~~{.php}
box b 0 0 0 10 20 30
box b2 30 30 0 10 20 30
@@ -6989,9 +7480,10 @@ are:
==d1_val d1 d12
~~~~
-@subsubsection occt_draw_7_9_4 xdistef, xdistcs, xdistcc, xdistc2dc2dss, xdistcc2ds
+
Syntax:
+
~~~~{.php}
xdistef edge face
xdistcs curve surface firstParam lastParam [NumberOfSamplePoints]
@@ -7010,6 +7502,7 @@ Commands with prefix *xdist* allow checking the distance between two objects on
* **xdistc2dc2dss** -- distance between two 2d curves on surface.
**Examples**
+
~~~~{.php}
bopcurves b1 b2 -2d
mksurf s1 b1
@@ -7019,9 +7512,10 @@ xdistcc2ds c_1 c2d2_1 s2 0 1
xdistc2dc2dss c2d1_1 c2d2_1 s1 s2 0 1 1000
~~~~
-@subsubsection occt_draw_7_9_5 checkshape
+
Syntax:
+
~~~~{.php}
checkshape [-top] shape [result] [-short] [-parallel] [-exact]
~~~~
@@ -7036,7 +7530,8 @@ Where:
**checkshape** examines the selected object for topological and geometric coherence. The object should be a three dimensional shape.
-**Example:**
+**Example:**
+
~~~~{.php}
# checkshape returns a comment valid or invalid
box b1 0 0 0 1 1 1
@@ -7045,9 +7540,10 @@ checkshape b1
this shape seems to be valid
~~~~
-@subsubsection occt_draw_7_9_6 tolsphere
+
Syntax:
+
~~~~{.php}
tolsphere shape
~~~~
@@ -7057,7 +7553,8 @@ Where:
**tolsphere** shows vertex tolerances by drawing spheres around each vertex in the shape. Each sphere is assigned a name of the shape with suffix "_vXXX", where XXX is the number of the vertex in the shape.
-**Example:**
+**Example:**
+
~~~~{.php}
# tolsphere returns all names of created spheres.
box b1 0 0 0 1 1 1
@@ -7067,9 +7564,10 @@ tolsphere b1
b1_v1 b1_v2 b1_v3 b1_v4 b1_v5 b1_v6 b1_v7 b1_v8
~~~~
-@subsubsection occt_draw_7_9_7 validrange
+
Syntax:
+
~~~~{.php}
validrange edge [(out) u1 u2]
~~~~
@@ -7080,7 +7578,8 @@ Where:
**validrange** computes valid range of the edge. If *u1* and *u2* are not given, it returns the first and the last parameters. Otherwise, it sets variables *u1* and *u2*.
-**Example:**
+**Example:**
+
~~~~{.php}
circle c 0 0 0 10
mkedge e c
@@ -7096,15 +7595,16 @@ dval u2
~~~~
-@subsection occt_draw_7_10 Surface creation
+
Surface creation commands include surfaces created from boundaries and from spaces between shapes.
* **gplate** creates a surface from a boundary definition.
* **filling** creates a surface from a group of surfaces.
-@subsubsection occt_draw_7_10_1 gplate,
+
Syntax:
+
~~~~{.php}
gplate result nbrcurfront nbrpntconst [SurfInit] [edge 0] [edge tang (1:G1;2:G2) surf]...[point] [u v tang (1:G1;2:G2) surf] ...
~~~~
@@ -7112,6 +7612,7 @@ gplate result nbrcurfront nbrpntconst [SurfInit] [edge 0] [edge tang (1:G1;2:G2)
Creates a surface from a defined boundary. The boundary can be defined using edges, points, or other surfaces.
**Example:**
+
~~~~{.php}
plane p
trim p p -1 3 -1 3
@@ -7168,9 +7669,10 @@ Approximation error : 0.000422195884750181
Criterium error : 3.43709808053967e-05
~~~~
-@subsubsection occt_draw_7_10_2 filling, fillingparam
+
Syntax:
+
~~~~{.php}
filling result nbB nbC nbP [SurfInit] [edge][face]order...
edge[face]order... point/u v face order...
@@ -7195,7 +7697,8 @@ The options are:
* -c t2d t3d tang tcur : to set tolerances
* -a maxdeg maxseg : Approximation option
-**Example:**
+**Example:**
+
~~~~{.php}
# to create four curved survaces and a point
plane p
@@ -7242,14 +7745,15 @@ MaxSegments = 9
~~~~
-@subsection occt_draw_7_11 Complex Topology
+
Complex topology is the group of commands that modify the topology of shapes. This includes feature modeling.
-@subsubsection occt_draw_7_11_1 offsetshape, offsetcompshape
+
Syntax:
+
~~~~{.php}
offsetshape r shape offset [tol] [face ...]
offsetcompshape r shape offset [face ...]
@@ -7263,7 +7767,8 @@ In case of complex shapes, where intersections can occur from non-adjacent edges
The opening between the object interior and exterior is defined by the argument face or faces.
-**Example:**
+**Example:**
+
~~~~{.php}
box b1 10 20 30
explode b1 f
@@ -7271,9 +7776,10 @@ explode b1 f
offsetcompshape r b1 -1 b1_3
~~~~
-@subsubsection occt_draw_7_11_2 featprism, featdprism, featrevol, featlf, featrf
+
Syntax:
+
~~~~{.php}
featprism shape element skface Dirx Diry Dirz Fuse(0/1/2) Modify(0/1)
featdprism shape face skface angle Fuse(0/1/2) Modify(0/1)
@@ -7380,9 +7886,10 @@ featrf c1 w pl 0 0 0 0 0 1 0.3 0.3 1 1
featperform rf result
~~~~
-@subsubsection occt_draw_7_11_3 draft
+
Syntax:
+
~~~~{.php}
draft result shape dirx diry dirz angle shape/surf/length [-IN/-OUT] [Ri/Ro] [-Internal]
~~~~
@@ -7399,7 +7906,8 @@ Computes a draft angle surface from a wire. The surface is determined by the dra
**Note** that the original aim of adding a draft angle to a shape is to produce a shape which can be removed easily from a mould. The Examples below use larger angles than are used normally and the calculation results returned are not indicated.
-**Example:**
+**Example:**
+
~~~~{.php}
# to create a simple profile
profile p F 0 0 x 2 y 4 tt 0 4 w
@@ -7411,16 +7919,18 @@ profile p F 0 0 x 2 y 4 tt 1 1.5 tt 0 4 w
draft res p 0 0 1 3 1 -Ro
~~~~
-@subsubsection occt_draw_7_11_4 deform
+
Syntax:
+
~~~~{.php}
deform newname name CoeffX CoeffY CoeffZ
~~~~
Modifies the shape using the x, y, and z coefficients. You can reduce or magnify the shape in the x,y, and z directions.
-**Example:**
+**Example:**
+
~~~~{.php}
pcylinder c 20 20
deform a c 1 3 5
@@ -7429,10 +7939,10 @@ deformation
~~~~
-@subsubsection occt_draw_7_11_5 nurbsconvert
+
Syntax:
-
+
~~~~{.php}
nurbsconvert result name [result name]
~~~~
@@ -7442,11 +7952,12 @@ This conversion is required for asymmetric deformation and prepares the argument
The conversion can be necessary when transferring shape data to other applications.
-@subsubsection occt_draw_7_11_6 edgestofaces
+
**edgestofaces** - The command allows building planar faces from the planar edges randomly located in 3D space.
It has the following syntax:
+
~~~~{.php}
edgestofaces r_faces edges [-a AngTol -s Shared(0/1)]
~~~~
@@ -7454,9 +7965,9 @@ Options:
* -a AngTol - angular tolerance used for distinguishing the planar faces;
* -s Shared(0/1) - boolean flag which defines whether the input edges are already shared or have to be intersected.
-@subsection occt_draw_hist History commands
+
-Draw module for @ref occt_modalg_hist "History Information support" includes the command to save history of modifications performed by Boolean operation or sibling commands into a drawable object and the actual history commands:
+Draw module for [History Information support](modeling_algos#occt_modalg_hist) includes the command to save history of modifications performed by Boolean operation or sibling commands into a drawable object and the actual history commands:
* **setfillhistory**;
* **savehistory**;
@@ -7464,12 +7975,13 @@ Draw module for @ref occt_modalg_hist "History Information support" includes the
* **modified**;
* **generated**.
-@subsubsection occt_draw_hist_set setfillhistory
+
*setfillhistory* command controls if the history is needed to be filled in the supported algorithms and saved into the session after the algorithm is done.
By default it is TRUE, i.e. the history is filled and saved.
Syntax:
+
~~~~{.php}
setfillhistory : Controls the history collection by the algorithms and its saving into the session after algorithm is done.
Usage: setfillhistory [flag]
@@ -7479,6 +7991,7 @@ setfillhistory : Controls the history collection by the algorithms and its savi
~~~~
Example:
+
~~~~{.php}
box b1 10 10 10
box b2 10 10 10
@@ -7497,11 +8010,12 @@ dump h
# - 0 Generated shapes.
~~~~
-@subsubsection occt_draw_hist_save savehistory
+
*savehistory* command saves the history from the session into a drawable object with the given name.
Syntax:
+
~~~~{.php}
savehistory : savehistory name
~~~~
@@ -7510,6 +8024,7 @@ If the history of shape modifications performed during an operation is needed, t
If another operation supporting history will be performed before the history of the first operation is saved it will be overwritten with the new history.
Example:
+
~~~~{.php}
box b1 10 10 10
box b2 5 0 0 10 10 15
@@ -7533,16 +8048,18 @@ dump usd_hist
# - 0 Generated shapes.
~~~~
-@subsubsection occt_draw_hist_isdel isdeleted
+
*isdeleted* command checks if the given shape has been deleted in the given history.
Syntax:
+
~~~~{.php}
isdeleted : isdeleted history shape
~~~~
Example:
+
~~~~{.php}
box b1 4 4 4 2 2 2
box b2 10 10 10
@@ -7556,16 +8073,18 @@ foreach s [join [list [explode b2 v] [explode b2 e] [explode b2 f] ] ] {
}
~~~~
-@subsubsection occt_draw_hist_mod modified
+
*modified* command returns the shapes Modified from the given shape in the given history. All modified shapes are put into a compound. If the shape has not been modified, the resulting compound will be empty. Note that if the shape has been modified into a single shape only, it will be returned without enclosure into the compound.
Syntax:
+
~~~~{.php}
modified : modified modified_shapes history shape
~~~~
Example:
+
~~~~{.php}
box b 10 10 10
explode b e
@@ -7579,16 +8098,18 @@ modified m3 fillet_hist b_3
modified m5 fillet_hist b_5
~~~~
-@subsubsection occt_draw_hist_gen generated
+
*generated* command returns the shapes Generated from the given shape in the given history. All generated shapes are put into a compound. If no shapes have been generated from the shape, the resulting compound will be empty. Note that; if the shape has generated a single shape only, it will be returned without enclosure into the compound.
Syntax:
+
~~~~{.php}
generated : generated generated_shapes history shape
~~~~
Example:
+
~~~~{.php}
polyline w1 0 0 0 10 0 0 10 10 0
polyline w2 5 1 10 9 1 10 9 5 10
@@ -7612,16 +8133,18 @@ compare g12 g22
# equal shapes
~~~~
-@subsubsection occt_draw_hist_extension Enabling Draw history support for the algorithms
+
Draw History mechanism allows fast and easy enabling of the Draw history support for the OCCT algorithms supporting standard history methods.
To enable History commands for the algorithm it is necessary to save the history of the algorithm into the session.
For that, it is necessary to put the following code into the command implementation just after the command is done:
+
~~~~{.php}
BRepTest_Objects::SetHistory(ListOfArguments, Algorithm);
~~~~
Here is the example of how it is done in the command performing Split operation (see implementation of the *bapisplit* command):
+
~~~~{.php}
BRepAlgoAPI_Splitter aSplitter;
// setting arguments
@@ -7652,16 +8175,16 @@ if (BRepTest_Objects::IsHistoryNeeded())
The method *BRepTest_Objects::IsHistoryNeeded()* controls if the history is needed to be filled in the algorithm and saved into the session after the algorithm is done (*setfillhistory* command controls this option in DRAW).
-@section occt_draw_bop Boolean Operations Commands
+
This chapter describes existing commands of Open CASCADE Draw Test Harness that are used for performing, analyzing, debugging the algorithm in Boolean Component.
-See @ref specification__boolean_operations "Boolean operations" user's guide for the description of these algorithms.
+See [Boolean operations](boolean_operations#specification__boolean_operations) user's guide for the description of these algorithms.
-@subsection occt_draw_bop_two Boolean Operations on two operands
+
All commands in this section perform Boolean operations on two shapes. One of them is considered as object, and the other as a tool.
-@subsubsection occt_draw_bop_two_bop bop, bopfuse, bopcut, boptuc, bopcommon, bopsection
+
These commands perform Boolean operations on two shapes:
* **bop** performs intersection of given shapes and stores the intersection results into internal Data Structure.
@@ -7675,6 +8198,7 @@ These commands allow intersecting the shapes only once for building all types of
It may be very useful as the intersection part is usually most time-consuming part of the operation.
Syntax:
+
~~~~{.php}
bop shape1 shape2
bopcommon result
@@ -7686,6 +8210,7 @@ boptuc result
**Example:**
Let's produce all four boolean operations on a box and a cylinder performing intersection only once:
+
~~~~{.php}
box b 0 -10 5 20 20 10
pcylinder c 5 20
@@ -7710,12 +8235,13 @@ bopsection s5
~~~~
-@subsubsection occt_draw_bop_two_bapi bfuse, bcut, btuc, bcommon, bsection
+
These commands also perform Boolean operations on two shapes. These are the short variants of the bop* commands.
Each of these commands performs both intersection and building the result and may be useful if you need only the result of a single boolean operation.
Syntax:
+
~~~~{.php}
bcommon result shape1 shape2
bfuse result shape1 shape2
@@ -7724,6 +8250,7 @@ btuc result shape1 shape2
~~~~
**bection** command has some additional options for faces intersection:
+
~~~~{.php}
bsection result shape1 shape2 [-n2d/-n2d1/-n2d2] [-na]
~~~~
@@ -7736,19 +8263,19 @@ shape1, shape2 - arguments of the operation
-n2d2 - disables PCurve construction on second object
-na - disables approximation of the section curves
-@subsection occt_draw_bop_multi Boolean Operations on multiple arguments
+
The modern Boolean Operations algorithm available in Open CASCADE Technology is capable of performing a Boolean Operations not only on two shapes, but on arbitrary number of shapes.
In terms of Boolean Operations these arguments are divided on two groups **Objects** and **Tools**. The meaning of these groups is similar to the single object and tool of Boolean Operations on two shapes.
-The Boolean operations are based on the General Fuse operation (see @ref specification__boolean_7 "General Fuse algorithm") which splits all input shapes basing on the intersection results.
+The Boolean operations are based on the General Fuse operation (see [General Fuse algorithm](boolean_operations#specification__boolean_7)) which splits all input shapes basing on the intersection results.
Depending on the type of Boolean operation the BOP algorithm choses the necessary splits of the arguments.
-@subsection occt_draw_bop_general_com General commands for working with multiple arguments
+
The algorithms based on General Fuse operation are using the same commands for adding and clearing the arguments list and for performing intersection of these arguments.
-@subsubsection occt_draw_bop_general_com_add Adding arguments of operation
+
The following commands are used to add the objects and tools for Boolean operations:
* **baddobjects** *S1 S2...Sn* -- adds shapes *S1, S2, ... Sn* as Objects;
@@ -7760,18 +8287,19 @@ The following commands are used to clear the objects and tools:
So, when running subsequent operation in one Draw session, make sure you cleared the Objects and Tools from previous operation. Otherwise, the new arguments will be added to the current ones.
-@subsubsection occt_draw_bop_general_com_fill Intersection of the arguments
+
The command **bfillds** performs intersection of the arguments (**Objects** and **Tools**) and stores the intersection results into internal Data Structure.
-@subsection occt_draw_bop_build Building the result of operations
+
-@subsubsection occt_draw_bop_build_BOP Boolean operation
+
The command **bbop** is used for building the result of Boolean Operation. It has to be used after **bfillds** command.
Syntax:
+
~~~~{.php}
bbop result iOp
~~~~
@@ -7787,6 +8315,7 @@ iOp - type of Boolean Operation. It could have the following values:
**Example**
+
~~~~{.php}
box b1 10 10 10
box b2 5 5 5 10 10 10
@@ -7809,16 +8338,18 @@ bbop rtuc 3
bbop rsec 4
~~~~
-@subsubsection occt_draw_bop_build_GF General Fuse operation
+
The command **bbuild** is used for building the result of General Fuse Operation. It has to be used after **bfillds** command.
General Fuse operation does not make the difference between Objects and Tools considering both as objects.
Syntax:
+
~~~~{.php}
bbuild result
~~~~
**Example**
+
~~~~{.php}
box b1 10 10 10
box b2 5 5 5 10 10 10
@@ -7837,12 +8368,13 @@ bfillds
bbuild result
~~~~
-@subsubsection occt_draw_bop_build_Split Split operation
+
Split operation splits the **Objects** by the **Tools**.
The command **bsplit** is used for building the result of Split operation. It has to be used after **bfillds** command.
**Example**
+
~~~~{.php}
box b1 10 10 10
box b2 5 5 5 10 10 10
@@ -7861,15 +8393,16 @@ bfillds
bsplit result
~~~~
-@subsubsection occt_draw_bop_build_BOP_opensolids Alternative command for BOP
+
There is an alternative way to build the result of Boolean operation using the **buildbop** command, which should be run after any other building command, such as **bbuild** or **bbop** or **bsplit**.
The command has the following features:
-* It is designed to work on open solids and thus uses the alternative approach for building the results (see @ref specification__boolean_bop_on_opensolids "BOP on open solids" chapter of Boolean operations user guide).
+* It is designed to work on open solids and thus uses the alternative approach for building the results (see [BOP on open solids](boolean_operations#specification__boolean_bop_on_opensolids) chapter of Boolean operations user guide).
* It allows changing the groups of Objects and Tools of the operation (even excluding some of the arguments is possible).
* History information for solids will be lost.
Syntax:
+
~~~~{.php}
buildbop result -o s1 [s2 ...] -t s3 [s4 ...] -op operation (common/fuse/cut/tuc)
~~~~
@@ -7880,6 +8413,7 @@ operation - type of boolean operation
**Example**
+
~~~~{.php}
box b1 10 10 10
box b2 5 5 5 10 10 10
@@ -7918,12 +8452,12 @@ buildbop r10 -o b1 -t b2 b3 -op cut
buildbop r11 -o b1 -t b2 b3 -op tuc
~~~~
-@subsubsection occt_draw_bop_build_CB Cells Builder
+
-See the @ref specification__boolean_10c_Cells_1 "Cells Builder Usage" for the Draw usage of Cells Builder algorithm.
+See the [Cells Builder Usage](boolean_operations#specification__boolean_10c_Cells_1) for the Draw usage of Cells Builder algorithm.
-@subsubsection occt_draw_bop_build_API Building result through API
+
The following commands are used to perform the operation using API implementation of the algorithms:
* **bapibuild** -- to perform API general fuse operation.
@@ -7933,11 +8467,12 @@ The following commands are used to perform the operation using API implementatio
These commands have the same syntax as the analogical commands described above.
-@subsection occt_draw_bop_options Setting options for the operation
+
The algorithms in Boolean component have a wide range of options.
To see the current state of all option the command **boptions** should be used.
It has the following syntax:
+
~~~~{.php}
boptions [-default]
@@ -7946,11 +8481,12 @@ boptions [-default]
To have an effect the options should be set before the operation (before *bfillds* command).
-@subsubsection occt_draw_bop_options_par Parallel processing mode
+
**brunparallel** command enables/disables the parallel processing mode of the operation.
Syntax:
+
~~~~{.php}
brunparallel flag
~~~~
@@ -7962,11 +8498,12 @@ flag != 0 - parallel processing mode is on.
The command is applicable for all commands in the component.
-@subsubsection occt_draw_bop_options_safe Safe processing mode
+
**bnondestructive** command enables/disables the safe processing mode in which the input arguments are protected from modification.
Syntax:
+
~~~~{.php}
bnondestructive flag
~~~~
@@ -7978,22 +8515,24 @@ flag != 0 - safe processing mode is on.
The command is applicable for all commands in the component.
-@subsubsection occt_draw_bop_options_fuzzy Fuzzy option
+
**bfuzzyvalue** command sets the additional tolerance for operations.
Syntax:
+
~~~~{.php}
bfuzzyvalue value
~~~~
The command is applicable for all commands in the component.
-@subsubsection occt_draw_bop_options_glue Gluing option
+
**bglue** command sets the gluing mode for the BOP algorithms.
Syntax:
+
~~~~{.php}
bglue 0/1/2
~~~~
@@ -8005,33 +8544,36 @@ Where:
The command is applicable for all commands in the component.
-@subsubsection occt_draw_bop_options_checkinv Check inversion of input solids
+
**bcheckinverted** command enables/disables the check of the input solids on inverted status in BOP algorithms.
Syntax:
+
~~~~{.php}
bcheckinverted 0 (off) / 1 (on)
~~~~
The command is applicable for all commands in the component.
-@subsubsection occt_draw_bop_options_obb OBB usage
+
**buseobb** command enables/disables the usage of OBB in BOP algorithms.
Syntax:
+
~~~~{.php}
buseobb 0 (off) / 1 (on)
~~~~
The command is applicable for all commands in the component.
-@subsubsection occt_draw_bop_options_simplify Result simplification
+
**bsimplify** command enables/disables the result simplification after BOP. The command is applicable only to the API variants of GF, BOP and Split operations.
Syntax:
+
~~~~{.php}
bsimplify [-e 0/1] [-f 0/1] [-a tol]
~~~~
@@ -8041,11 +8583,12 @@ Where:
-a tol - changes default angular tolerance of unification algo.
-@subsubsection occt_draw_bop_options_warn Drawing warning shapes
+
**bdrawwarnshapes** command enables/disables drawing of warning shapes of BOP algorithms.
Syntax:
+
~~~~{.php}
bdrawwarnshapes 0 (do not draw) / 1 (draw warning shapes)
~~~~
@@ -8053,13 +8596,14 @@ bdrawwarnshapes 0 (do not draw) / 1 (draw warning shapes)
The command is applicable for all commands in the component.
-@subsection occt_draw_bop_check Check commands
+
The following commands are analyzing the given shape on the validity of Boolean operation.
-@subsubsection occt_draw_bop_check_1 bopcheck
+
Syntax:
+
~~~~{.php}
bopcheck shape [level of check: 0 - 9]
~~~~
@@ -8077,6 +8621,7 @@ It checks the given shape for self-interference. The optional level of check all
* 9 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S, F/S and S/S - all interferences (Default value)
**Example:**
+
~~~~{.php}
box b1 10 10 10
box b2 3 3 3 4 4 4
@@ -8088,9 +8633,10 @@ In this example one box is completely included into other box. So the output sho
**bopcheck** command does not modifies the input shape, thus can be safely used.
-@subsubsection occt_draw_bop_check_2 bopargcheck
+
**bopargcheck** syntax:
+
~~~~{.php}
bopargcheck Shape1 [[Shape2] [-F/O/C/T/S/U] [/R|F|T|V|E|I|P|C|S]] [#BF]
@@ -8128,6 +8674,7 @@ As you can see *bopargcheck* performs more extended check of the given shapes th
**Example:**
Let's make an edge with big vertices:
+
~~~~{.php}
vertex v1 0 0 0
settolerance v1 0.5
@@ -8140,6 +8687,7 @@ tolsphere e
bopargcheck e
~~~~
Here is the output of this command:
+
~~~~{.php}
Made faulty shape: s1si_1
Made faulty shape: s1se_1
@@ -8158,7 +8706,7 @@ Invalid Curve on Surface : NO
Faulties for SECOND shape found : 0
~~~~
-@subsection occt_draw_bop_debug Debug commands
+
The following terms and definitions are used in this chapter:
* **DS** -- internal data structure used by the algorithm (*BOPDS_DS* object).
@@ -8166,13 +8714,14 @@ The following terms and definitions are used in this chapter:
* **Builder** -- builder part of the algorithm (*BOPAlgo_Builder* object).
* **IDS Index** -- the index of the vector *myLines*.
-@subsubsection occt_draw_bop_debug_int Intersection Part commands
+
All commands listed below are available when the Intersection Part of the algorithm is done (i.e. after the command *bfillds*).
**bopds**
Syntax:
+
~~~~{.php}
bopds -v [e, f]
~~~~
@@ -8188,6 +8737,7 @@ Displays:
Prints contents of the DS.
Example:
+
~~~~{.php}
Draw[28]> bopdsdump
*** DS ***
@@ -8206,7 +8756,7 @@ Example:
8 : VERTEX { }
~~~~
-@code 0 : SOLID { 1 } @endcode has the following meaning:
+``` 0 : SOLID { 1 } ``` has the following meaning:
* *0* -- index in the DS;
* *SOLID* -- type of the shape;
* { 1 } -- a DS index of the successors.
@@ -8215,6 +8765,7 @@ Example:
**bopindex**
Syntax:
+
~~~~{.php}
bopindex S
~~~~
@@ -8224,6 +8775,7 @@ Prints DS index of shape *S*.
**bopiterator**
Syntax:
+
~~~~{.php}
bopiterator [t1 t2]
~~~~
@@ -8236,6 +8788,7 @@ Prints pairs of DS indices of source shapes that are intersected in terms of bou
* *4* -- face.
Example:
+
~~~~{.php}
Draw[104]> bopiterator 6 4
EF: ( z58 z12 )
@@ -8253,6 +8806,7 @@ Example:
**bopinterf**
Syntax:
+
~~~~{.php}
bopinterf t
~~~~
@@ -8265,6 +8819,7 @@ Prints contents of *myInterfTB* for the type of interference *t*:
* *t=4* : edge/face.
Example:
+
~~~~{.php}
Draw[108]> bopinterf 4
EF: (58, 12, 68), (17, 56, 69), (19, 64, 70), (45, 26, 71), (29, 36, 72), (38, 32, 73), 6 EF found.
@@ -8281,6 +8836,7 @@ Here, record (58, 12, 68) means:
Displays split edges.
Example:
+
~~~~{.php}
Draw[33]> bopsp
edge 58 : z58_74 z58_75
@@ -8297,6 +8853,7 @@ Example:
**bopcb**
Syntax:
+
~~~~{.php}
bopcb [nE]
~~~~
@@ -8306,6 +8863,7 @@ Prints Common Blocks for:
* the source edge with the specified index *nE*.
Example:
+
~~~~{.php}
Draw[43]> bopcb 17
-- CB:
@@ -8326,12 +8884,14 @@ This command dumps common blocks for the source edge with index 17.
**bopfin**
Syntax:
+
~~~~{.php}
bopfin nF
~~~~
Prints Face Info about IN-parts for the face with DS index *nF*.
Example:
+
~~~~{.php}
Draw[47]> bopfin 36
pave blocks In:
@@ -8348,12 +8908,14 @@ Example:
**bopfon**
Syntax:
+
~~~~{.php}
bopfon nF
~~~~
Print Face Info about ON-parts for the face with DS index *nF*.
Example:
+
~~~~{.php}
Draw[58]> bopfon 36
pave blocks On:
@@ -8371,6 +8933,7 @@ Example:
**bopwho**
Syntax:
+
~~~~{.php}
bopwho nS
~~~~
@@ -8378,6 +8941,7 @@ bopwho nS
Prints the information about the shape with DS index *nF*.
Example:
+
~~~~{.php}
Draw[116]> bopwho 5
rank: 0
@@ -8386,6 +8950,7 @@ Example:
* *rank: 0* -- means that shape 5 results from the Argument with index 0.
Example:
+
~~~~{.php}
Draw[118]> bopwho 68
the shape is new
@@ -8402,6 +8967,7 @@ This means that shape 68 is a result of the following interferences:
**bopnews**
Syntax:
+
~~~~{.php}
bopnews -v [-e]
~~~~
@@ -8409,20 +8975,21 @@ bopnews -v [-e]
* -v -- displays all new vertices produced during the operation;
* -e -- displays all new edges produced during the operation.
-@subsubsection occt_draw_bop_debug_build Building Part commands
+
The commands listed below are available when the Building Part of the algorithm is done (i.e. after the command *bbuild*).
**bopim**
Syntax:
+
~~~~{.php}
bopim S
~~~~
Shows the compound of shapes that are images of shape *S* from the argument.
-@section occt_draw_8 Data Exchange commands
+
This chapter presents some general information about Data Exchange (DE) operations.
@@ -8441,11 +9008,12 @@ Each entity from a file has its own number in the model (num). During the transl
The model and the map are used for working with most of DE commands.
-@subsection occt_draw_8_1 IGES commands
+
-@subsubsection occt_draw_8_1_1 igesread
+
Syntax:
+
~~~~{.php}
igesread [