0028345: Data Exchange - Reading STEP model using STEPCAF crashes
[occt.git] / dox / overview / overview.md
CommitLineData
f1c9c9d7 1\feffOverview {#mainpage}
ba06f8bb 2========
3
4@tableofcontents
5
e2ba9cb1 6@htmlonly<center>@endhtmlonly
7e3451c7 7@figure{/resources/occt_logo.png}
e2ba9cb1 8@htmlonly</center>@endhtmlonly
9
ba06f8bb 10@section OCCT_OVW_SECTION_1 Welcome
11
12Welcome to Open CASCADE Technology (OCCT), a software development platform
13providing services for 3D surface and solid modeling, CAD data exchange, and
14visualization. Most of OCCT functionality is available in the form of C++
15libraries. OCCT can be best applied in development of software dealing with 3D
16modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
17
ba06f8bb 18@section OCCT_OVW_SECTION_2 Copyrights
19
20Open CASCADE Technology and all materials, including this documentation, is
57f84042 21Copyright (c) 1999-2018 by OPEN CASCADE S.A.S. All rights reserved.
ba06f8bb 22
23@htmlonly<center>@endhtmlonly
896faa72 24https://www.opencascade.com
7e3451c7 25@figure{/resources/occ_logo.png}
ba06f8bb 26@htmlonly</center>@endhtmlonly
27
28 License
29--------
30
3ba79772 31Open CASCADE Technology is free software; you can redistribute it and / or modify it under the terms of the
32@ref license_lgpl_21 "GNU Lesser General Public License (LGPL) version 2.1", with additional @ref occt_lgpl_exception "exception".
33
34Note that LGPL imposes some obligations on the application linked with Open CASCADE Technology.
07f2b741 35If you wish to use OCCT in a proprietary application, please pay a special attention to address the requirements of LGPL section 6.
3ba79772 36At minimum the following should be considered:
371. Add the notice visible to the users of your application clearly stating that Open CASCADE Technology is used in this application, and that they have rights in this regard according to LGPL.
38 Such notice can be added in About dialog box (this is mandatory if this box contains copyright statements) or a similar place and/or in the documentation.
39 The text of LGPL license should be accessible to the user.
402. Make the copy of OCCT sources used by the application available to its users, and if necessary provide instructions on how to build it in a way compatible with the application.
413. Ensure that the user actually can exercise the right to run your application with a modified version of OCCT.
42 If the application is distributed in a form that does not allow the user to modify OCCT part (e.g. the application is linked to OCCT statically or is distributed via AppStore on iOS, GooglePlay on Android, Windows Store, etc.),
43 the application should be provided separately in a modifiable form, with all materials needed for the user to be able to run the application with a modified version of OCCT.
44
45If you want to use Open CASCADE Technology without being bound by LGPL requirements,
46please <a href="https://www.opencascade.com/contact">contact Open CASCADE company</a> for a commercial license.
ba06f8bb 47
48Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
49WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
50materials is on you. See the @ref occt_public_license "license" text for formal
51disclaimer.
52
53 Trademark information
54----------------------
55
56You are hereby informed that all software is a property of its respective authors and is protected by
57international and domestic laws on intellectual property and trademarks.
07f2b741 58Should you need further information, directly contact the authors.
ba06f8bb 59
60**CAS.CADE** and **Open CASCADE** are registered trademarks of
61OPEN CASCADE S.A.S.
62
63**Linux** is a registered trademark of Linus Torvalds.
64
65**Windows** is a registered trademark of Microsoft Corporation in the United States and other countries.
66
8bcdd697 67**Mac** and the Mac logo are trademarks of Apple Inc., registered in the U.S. and other countries.
ba06f8bb 68
3f812249 69 Acknowledgments
70-----------------
ba06f8bb 71
72The following parties are acknowledged for producing tools which are used within
73Open CASCADE Technology libraries or for release preparation.
74
75You are hereby informed that all rights to the software listed below belong to its respective
76authors and such software may not be freely available and/or be free of charge for any kind
77of use or purpose. We strongly recommend that you carefully read the license of these products
78and, in case you need any further information, directly contact their authors.
79
80**Qt** is a cross-platform application framework that is widely used for developing application software
81with graphical user interface (GUI). Qt is free and open source software distributed under
82the terms of the GNU Lesser General Public License. In OCCT Qt is used for programming samples.
07f2b741 83If you need further information on Qt, refer to Qt Homepage (https://www.qt.io/)
ba06f8bb 84
85**Tcl** is a high-level programming language. Tk is a graphical user interface (GUI) toolkit,
86with buttons, menus, listboxes, scrollbars, and so on. Taken together Tcl and Tk provide a solution
87to develop cross-platform graphical user interfaces with a native look and feel. Tcl/Tk is under copyright by
88Scriptics Corp., Sun Microsystems, and other companies. However, Tcl/Tk is an open source, and
89the copyright allows you to use, modify, and redistribute Tcl/Tk for any purpose, without an
90explicit license agreement and without paying any license fees or royalties.
07f2b741 91To use Tcl/Tk, refer to the Licensing Terms (https://www.tcl.tk/software/tcltk/license.html).
ba06f8bb 92
ba06f8bb 93**FreeType 2** is developed by Antoine Leca, David Turner, Werner Lemberg and others.
94It is a software font engine that is designed to be small, efficient, highly customizable and
95portable while capable of producing high-quality output (glyph images). This product
96can be used in graphic libraries, display servers, font conversion tools,
97text image generation tools, and many other products.
43409819 98FreeType 2 is released under two open-source licenses: BSD-like FreeType License and the GPL (https://www.freetype.org/license.html).
ba06f8bb 99
100**Intel(R) Threading Building Blocks (TBB)** offers a rich and complete approach to expressing parallelism in a C++ program.
101It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert.
102Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that
103abstracts platform details and threading mechanisms for scalability and performance.
43409819 104TBB version 2017 is available under Apache 2.0 license, while older versions
105until 4.4 are available under GPLv2 license with the runtime exception (https://www.threadingbuildingblocks.org).
ba06f8bb 106
ba06f8bb 107**OpenGL** is an industry standard API for 3D graphics used by OCCT for
108implementation of 3D viewer. OpenGL specification is developed by the
896faa72 109Khronos group, https://www.khronos.org/opengl/. OCCT code includes header
ba06f8bb 110file *glext.h* obtained from Khronos web site.
111
7863dabb 112**VTK** -- The **Visualization Toolkit (VTK)** is an open-source, freely available software system for 3D computer graphics, image processing and visualization. OCCT VIS component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. If you need further information on VTK, refer to VTK Homepage https://www.vtk.org/.
ba06f8bb 113
114**Doxygen** developed by Dimitri van Heesch is open source documentation system for
115C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology
116for automatic creation of Technical Documentation from C++ header files.
07f2b741 117If you need further information on Doxygen, refer to https://www.stack.nl/~dimitri/doxygen/index.html.
ba06f8bb 118
119**Graphviz** is open source graph visualization software developed by John Ellson, Emden Gansner, Yifan Hu and Arif Bilgin.
120Graph visualization is representiation of structured information as diagrams of abstract graphs and networks.
121This product is used together with Doxygen in Open CASCADE Technology for automatic creation of Technical Documentation
122(generation of dependency graphs). Current versions of Graphviz are licensed on an open source
7863dabb 123basis under The Eclipse Public License (EPL) (https://www.graphviz.org/license/).
ba06f8bb 124
125**Inno Setup** is a free script-driven installation system created in CodeGear Delphi by Jordan Russell.
126In OCCT Inno Setup is used to create Installation Wizard on Windows.
43409819 127It is licensed under Inno Setup License (http://www.jrsoftware.org/files/is/license.txt).
ba06f8bb 128
129**FreeImage** is an Open Source library supporting popular graphics image formats, such as PNG, BMP, JPEG, TIFF,
130and others used by multimedia applications. This library is developed by Hervé Drolon and Floris van den Berg.
131FreeImage is easy to use, fast, multithreading safe, compatible with all 32-bit or 64-bit versions of Windows,
132and cross-platform (works both with Linux and Mac OS X). FreeImage is optionally used by OCCT to work
7863dabb 133with images, on conditions of the FreeImage Public License (FIPL) (https://freeimage.sourceforge.net/freeimage-license.txt).
896faa72 134
07bbde45 135**David M. Gay's floating point routines** (dtoa.c) are used for fast reading of floating point values from text strings.
7863dabb 136These routines are available under MIT-like license (see https://www.netlib.org/fp/).
07bbde45 137
896faa72 138**CMake** is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice.
139OCCT uses CMake as a build system. CMake is available under BSD 3-Clause license. See more at https://cmake.org/
140
141**Cotire** (compile time reducer) is a CMake module that speeds up the build process of CMake based build systems
142by fully automating techniques as precompiled header usage and single compilation unit builds for C and C++.
143Cotire is included in OCCT repository and used optionally by OCCT CMake scripts to accelerate builds by use of precompiled headers.
144Cotire is licensed under the MIT license (https://github.com/sakra/cotire/blob/master/license).
ba06f8bb 145
08f8a185 146**FFmpeg** is an Open Source framework supporting various image, video and audio codecs.
147FFmpeg is optionally used by OCCT for video recording, on LGPL conditions (https://www.ffmpeg.org/legal.html).
148
ba06f8bb 149**MikTEX** is up-to-date implementation of TeX/LaTeX and related programs for Windows. It is used
896faa72 150for generation of User and Developer Guides in PDF format. See https://miktex.org for information
ba06f8bb 151on this tool.
152
7863dabb 153**RapidJSON** is an Open Source JSON parser and generator for C++.
154RapidJSON is optionally used by OCCT for reading glTF files (https://rapidjson.org/).
155
36e28f96 156**DejaVu** fonts are a font family based on the Vera Fonts under a permissive license (MIT-like, https://dejavu-fonts.github.io/License.html).
157DejaVu Sans (basic Latin sub-set) is used by OCCT as fallback font when no system font is available.
158
ba06f8bb 159Adobe Systems, Inc. provides **Adobe Reader**, which can be used to view files in Portable Document Format (PDF).
160
161@section OCCT_OVW_SECTION_3 Documentation
162
163OCCT documentation is provided in several forms:
164
165- This overview provides general description of OCCT structure, functionality, modules, and features.
166 It is available in HTML format (generated by Doxygen) and includes User and Developer Guides.
167 The sources of this documentation are contained in **dox** subdirectory of OCCT sources
168 (plain text format is used, with mixed MarkDown / Doxygen syntax mark-up).
169
170- User and Developer Guides describing in details OCCT modules and development tools are also available in
171 Adobe Portable Document Format (PDF). To read this format, you need Adobe Acrobat Reader,
172 which is a freeware and can be downloaded from the Adobe site.
173
174- Full reference documentation covering all OCCT classes generated automatically by Doxygen
3554ea68 175 software is provided in HTML format.
ba06f8bb 176 Reference documentation is presented in **Modules --> Toolkits --> Packages --> Classes**
177 logic structure with cross-references to all OCCT classes and complete in-browser search by all classes.
178
179See @ref occt_dev_guides__documentation "OCCT Documentation Guide" for details on OCCT documentation system.
180
181**Generation of HTML documentation**
182
183To generate HTML documentation from sources contained in *dox* subdirectory,
ae3eaf7b 184you need to have Tcl and Doxygen 1.8.5 (or above) installed on your system.
ba06f8bb 185
e2ba9cb1 186Use script **gendoc** (batch file on Windows, shell script on Linux / Mac OSX) to generate documentation.
ba06f8bb 187
e2ba9cb1 188To generate Overview documentation:
ba06f8bb 189
e2ba9cb1 190 cmd> gendoc -overview
ba06f8bb 191
e2ba9cb1 192To generate Reference manual:
ba06f8bb 193
e2ba9cb1 194 cmd> gendoc -refman
ba06f8bb 195
e2ba9cb1 196Run this command without arguments to get help on supported options.
ba06f8bb 197
198@section OCCT_OVW_SECTION_5 Requirements
199
200Open CASCADE Technology is designed to be highly portable and is known to
2a4611e1 201work on wide range of platforms.
ba06f8bb 202Current version is officially certified on Windows (IA-32 and x86-64),
2a4611e1 203Linux (x86-64), OS X / macOS (x86-64), Android (armv7 and x86), and
204iOS (armv7, arm64) platforms.
ba06f8bb 205
2a4611e1 206The tables below describe the recommended software configurations
ba06f8bb 207for which OCCT is certified to work.
208
3554ea68 209@subsection overview_req_cpp C++ Compiler / IDE
ba06f8bb 210
3554ea68 211| OS | Compiler |
212| --------- | ----------- |
1bd04b5a 213| Windows | Microsoft Visual Studio: 2008 SP1, 2010 SP1, 2012 Update 4, 2013 Update 5, 2015 Update 3, 2017 <sup>1</sup>, 2019 <br>, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)|
3554ea68 214| Linux | GNU gcc 4.3+ <br> LLVM CLang 3.6+ |
71c810df 215| OS X / macOS | XCode 6 or newer |
3554ea68 216| Android | NDK r10, GNU gcc 4.8 or newer |
565baee6 217| Web | Emscripten SDK 1.39 or newer (CLang) |
ba06f8bb 218
7863dabb 2191) VC++ 141 64-bit is used for regular testing and for building binary package of official release of OCCT on Windows.
3554ea68 220
221@subsection overview_req_libs Third-party libraries
222
223| Component | Requirement |
224| --------- | ----------- |
225| Graphic library | OpenGL 3.3+, OpenGL ES 2.0+ <br> Direct3D 9 |
43409819 226| Qt (for samples and demos) | Desktop: Qt 4.8.6+ https://www.qt.io/download/ <br> Android: Qt 5.3.2+ https://www.qt.io/download/ |
227| TCL (for testing tools) | Tcl/Tk 8.6.3+ https://www.tcl.tk/software/tcltk/download.html <br> or ActiveTcl 8.6 https://www.activestate.com/activetcl/downloads (for Windows)|
57f84042 228| Freetype (for text rendering) | FreeType 2.4.11-2.7.1 https://sourceforge.net/projects/freetype/files/ |
43409819 229| FreeImage (optional, for support of common 2D graphic formats) | FreeImage 3.17.0+ https://sourceforge.net/projects/freeimage/files |
230| FFmpeg (optional, for video recording) | FFmpeg 3.1+ https://www.ffmpeg.org/download.html |
7863dabb 231| RapidJSON (optional, for reading glTF) | RapidJSON 1.1+ https://rapidjson.org/ |
43409819 232| Intel TBB (optional, for multithreaded algorithms) | TBB 4.x or 5.x https://www.threadingbuildingblocks.org/ |
7863dabb 233| VTK (for VTK Integration Services | VTK 6.1+ https://www.vtk.org/download/ |
43409819 234| Doxygen (optional for building documentation) | Doxygen 1.8.5+ https://www.stack.nl/~dimitri/doxygen/download.html |
9f33b387 235
3554ea68 236@subsection overview_req_hw Hardware
9f33b387 237
3554ea68 238| Component | Requirement |
239| --------- | ----------- |
240| Minimum memory | 512 MB, 1 GB recommended |
241| Free disk space (complete installation) | 600 MB approx. |
ba06f8bb 242
3554ea68 243On desktop, 3D viewer for optimal performance requires graphics processing unit (GPU) supporting OpenGL 3.3 or above.
251a7984 244Ray tracing requires OpenGL 4.0+ or OpenGL 3.3+ with *GL_ARB_texture_buffer_object_rgb32* extension.
245Textures within ray tracing will be available only when *GL_ARB_bindless_texture extension* is provided by driver.
8bcdd697 246
2a4611e1 247On mobile platforms, OpenGL ES 2.0+ is required for 3D viewer (OpenGL ES 3.1+ is recommended).
248The ray tracing is not yet available on mobile platforms.
8bcdd697 249Some old hardware might be unable to execute complex GLSL programs (e.g. with high number of light sources, clipping planes).
ba06f8bb 250
2a4611e1 251OCCT 3D Viewer, in general, supports wide range of graphics hardware - from very old to new.
252Therefore, if you observe some unexpected visual issues - first check for OpenGL driver update (or firmware update in case of mobile platforms);
253but beware that driver update might also come with new bugs.
254Don't forget to report these bugs to vendors.
ba06f8bb 255
256@section OCCT_OVW_SECTION_4 Installation
257
258In most cases you need to rebuild OCCT on your platform (OS, compiler) before
259using it in your project, to ensure binary compatibility.
260See @ref occt_dev_guides__building for instructions on
261building OCCT from sources on supported platforms.
262
263@subsection OCCT_OVW_SECTION_4_1 Using Windows installer
264
265On Windows Open CASCADE Technology can be installed with binaries precompiled by
18006a0f 266Visual C++ 2010 with installation procedure.
ba06f8bb 267
268**Recommendation:**
269
270If you have a previous version of OCCT installed on your station,
271and you do not plan to use it along with the new version, you might want to uninstall
272the previous version (using Control Panel, Add/Remove Programs) before
273the installation of this new version, to avoid possible problems
274(conflict of system variables, paths, etc).
275
276**Attention:** For full installation OCCT requires approximately 650 Mb of disk space,
277but during the installation process you will need 1,2 Gb of free disk space.
278
279OCCT installation with reference documentation requires 1,4 Gb on disk.
280
281 * Download the OCCT installer from OPEN CASCADE web site using the link. you have been provided
282 * Launch the installer and follow the instructions.
283
284The includes and binaries of third-party libraries necessary for building and launching
16f82a28 285OCCT are included into binary distribution (built with Visual C++ 2010).
ba06f8bb 286When the installation is complete, you will find the directories for 3rd party products
287(some might be absent in case of custom installation) and the main **OCCT** directory:
288
7e3451c7 289@figure{/overview/images/overview_3rdparty.png}
ba06f8bb 290
7863dabb 291The contents of the OCCT-7.4.0 directory (called further "OCCT root", or $CASROOT) are as follows:
ba06f8bb 292
7e3451c7 293@figure{/overview/images/overview_installation.png, "The directory tree"}
ba06f8bb 294
295 * **adm** This folder contains administration files, which allow rebuilding OCCT;
296 * **adm/cmake** This folder contains files of CMake building procedure;
7863dabb 297 * **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2010, 2012, 2013, 2015, 2017 and 2019 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode;
ba06f8bb 298 * **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
299 * **doc** This folder contains OCCT documentation in HTML and PDF format;
300 * **dox** This folder contains sources of OCCT documentation in plain text (MarkDown) format;
d3013f55 301 * **inc** This folder contains copies of all OCCT header files;
ba06f8bb 302 * **samples** This folder contains sample applications.
303 * **src** This folder contains OCCT source files. They are organized in folders, one per development unit;
304 * **tests** This folder contains scripts for OCCT testing.
57f84042 305 * **tools** This folder contains sources of Inspector tool.
16f82a28 306 * **win64/vc10** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010;
ba06f8bb 307
308@section OCCT_OVW_SECTION_4_2 Environment Variables
309
310To run any Open CASCADE Technology application you need to set the environment variables.
311
312### On Windows
313
314You can define the environment variables with env.bat script located in the
315$CASROOT folder. This script accepts two arguments to be used:
7863dabb 316the version of Visual Studio (vc10 -- vc142) and the architecture (win32 or win64).
ba06f8bb 317
318The additional environment settings necessary for compiling OCCT libraries and samples
319by Microsoft Visual Studio can be set using script custom.bat located in the same folder.
320You might need to edit this script to correct the paths to third-party libraries
321if they are installed on your system in a non-default location.
322
323Script msvc.bat can be used with the same arguments for immediate launch of Visual Studio for (re)compiling OCCT.
324
325### On Unix
326
327
328 If OCCT was built by Code::Blocks, you can define the environment variables with env_cbp.sh or custom_cbp.sh script.
329
330 If OCCT was built by Automake, you can define the environment variables with env_amk.sh or custom_amk.sh script.
331
332The scripts are located in the OCCT root folder.
333
334
335### Description of system variables:
336
ba06f8bb 337 * **CASROOT** is used to define the root directory of Open CASCADE Technology;
338 * **PATH** is required to define the path to OCCT binaries and 3rdparty folder;
7863dabb 339 * **LD_LIBRARY_PATH** is required to define the path to OCCT libraries (on UNIX platforms only; **DYLD_LIBRARY_PATH** variable in case of macOS);
ba06f8bb 340 * **MMGT_OPT** (optional) if set to 1, the memory manager performs optimizations as described below; if set to 2,
341 Intel (R) TBB optimized memory manager is used; if 0 (default), every memory block is allocated
342 in C memory heap directly (via malloc() and free() functions).
d3013f55 343 In the latter case, all other options starting with *MMGT*, except MMGT_CLEAR, are ignored;
ba06f8bb 344 * **MMGT_CLEAR** (optional) if set to 1 (default), every allocated memory block is cleared by zeros;
345 if set to 0, memory block is returned as it is;
346 * **MMGT_CELLSIZE** (optional) defines the maximal size of blocks allocated in large pools of memory. Default is 200;
347 * **MMGT_NBPAGES** (optional) defines the size of memory chunks allocated for small blocks in pages
348 (operating-system dependent). Default is 10000;
349 * **MMGT_THRESHOLD** (optional) defines the maximal size of blocks that are recycled internally
350 instead of being returned to the heap. Default is 40000;
351 * **MMGT_MMAP** (optional) when set to 1 (default), large memory blocks are allocated using
352 memory mapping functions of the operating system; if set to 0,
353 they will be allocated in the C heap by malloc();
d3013f55 354 * **CSF_LANGUAGE** (optional) defines default language of messages;
ba06f8bb 355 * **CSF_DEBUG** (optional, Windows only): if defined then a diagnostic message is displayed in case of an exception;
356 * **CSF_DEBUG_BOP** (optional): if defined then it should specify directory where diagnostic data on problems occured in Boolean operations will be saved;
357 * **CSF_MDTVTexturesDirectory** defines the directory for available textures when using texture mapping;
ee5befae 358 * **CSF_ShadersDirectory** (optional) defines the directory for GLSL programs for Ray Tracing renderer (embedded resources are used when variable is undefined);
359 * **CSF_SHMessage** (optional) defines the path to the messages file for *ShapeHealing*;
360 * **CSF_XSMessage** (optional) defines the path to the messages file for **STEP** and **IGES** translators;
d3013f55 361 * **CSF_StandardDefaults**, **CSF_StandardLiteDefaults*, **CSF_XCAFDefaults**, and **CSF_PluginDefaults** define paths to directory where configuration files for OCAF persistence are located (required for open/save operations with OCAF documents);
362 * **CSF_IGESDefaults** and **CSF_STEPDefaults** (optional) define paths to directory where resource files of **IGES** and **STEP** translators are located;
ba06f8bb 363 * **CSF_XmlOcafResource** is required in order to set the path to **XSD** resources, which defines XML grammar.
364 * **CSF_MIGRATION_TYPES** is required in order to read documents that contain old data types, such as *TDataStd_Shape*;
ba06f8bb 365
366@section OCCT_OVW_SECTION_7 Getting Started
367
368@subsection OCCT_OVW_SECTION_7_1 Draw Test Harness
369
370Draw is a command interpreter based on TCL and a graphical system used for testing and demonstrating OCCT modeling libraries.
371
372Draw can be used interactively to create, display and modify objects such as curves, surfaces and topological shapes.
373
7e3451c7 374@figure{/overview/images/overview_draw.png}
ba06f8bb 375
376Scripts can be written to customize Draw and perform tests.
377New types of objects and new commands can be added using C++ programming language.
378
379Draw contains:
380
381 * A command interpreter based on TCL command language.
382 * A 2D an 3D graphic viewer with support of operations such as zoom, pan, rotation and full-screen views.
383 * An optional set of geometric commands to create and modify curves and surfaces and to use OCCT geometry algorithms.
384 * A set of topological commands to create and modify BRep shapes and to use OCCT topology algorithms.
385 * A set of graphic commands for view and display operations including Mesh Visualization Service.
386 * A set of Application framework commands for handling of files and attributes.
387 * A set of Data Exchange commands for translation of files from various formats (IGES,STEP) into OCCT shapes.
388 * A set of Shape Healing commands: check of overlapping edges, approximation of a shape to BSpline, etc.
389
390You can add new custom test harness commands to Draw in order to test
391or demonstrate a new functionality, which you are developing.
392
251a7984 393Currently DRAW Test Harness is a single executable called *DRAWEXE*.
ba06f8bb 394
395Commands grouped in toolkits can be loaded at run-time thereby implementing dynamically loaded plug-ins.
396Thus you can work only with the commands that suit your needs adding
397the commands dynamically without leaving the Test Harness session.
398
399Declaration of available plug-ins is done through special resource file(s).
251a7984 400The *pload* command loads the plug-in in accordance with
ba06f8bb 401the specified resource file and activates the commands implemented in the plug-in.
402
403The 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.
404
405Draw Test Harness provides an environment for OCCT automated testing system.
07f2b741 406Check its @ref occt_dev_guides__tests "Automated Testing System" for details.
ba06f8bb 407
408Remarks:
409
410* The DRAWEXE executable is delivered with the installation procedure on Windows platform only.
411* To start it, launch DRAWEXE executable from Open CASCADE Technology/Draw Test Harness item of the Start\\Programs menu.
412
413@subsection OCCT_OVW_SECTION_7_2 Experimenting with Draw Test Harness
414
415 Running Draw
416------------
417
418**On Linux:**
419
7863dabb 420* If OCCT was built by Code::Blocks use <i>$CASROOT/draw.sh</i> file to launch *DRAWEXE* executable.
ba06f8bb 421
422Draw[1]> prompt appears in the command window
423
424Type *pload ALL*
425
426**On Windows:**
427
428Launch Draw executable from Open CASCADE Technology\\Test Harness\\Draw Test Harness
429item of the Start\\Programs menu or Use <i>$CASROOT\\draw.bat</i> file to launch *DRAWEXE* executable.
430
431Draw[1]> prompt appears in the command window
432
433Type pload ALL
434
435**Creating your first geometric objects**
436
4371. In the command window, type *axo* to create an axonometric view
4382. Type *box b -10 -10 -10 20 20 20* to create a cube *b* of size 20, parallel to the X Y Z axis and centered on the origin. The cube will be displayed in the axonometric view in wireframe mode.
4393. Type *fit* to fill the viewer with the cube
4404. Type *pcylinder c 2 30* to create a cylinder *c* of radius 2 and height 30. The cylinder will be displayed in addition to the cube
441
442**Manipulating the view**
443
4441. Type *clear* to erase the view
4452. Type *donly c* to display the cylinder only
4463. Type *donly b* to display the cube only
4474. Type *hlr hlr b* to display the cube in the hidden line removal mode
448
449**Running demonstration files**
450
4511. Type *cd ../..* to return to the root directory
4522. Type *cd samples/tcl* to reach the *DrawResources* directory
4533. Type *source \<demo_file\>* to run the demonstration file provided with Open CASCADE. The following demonstration files are available:
454 * DataExchangeDemo.tcl: demonstrates sample sequence of operations with writing and reading IGES file
455 * ModelingDemo.tcl: demonstrates creation of simple shape and displaying it in HLR mode
456 * VisualizationDemo.tcl: demonstrates use of 3d viewer
a347ef35 457 * cad.tcl: creates solid shape looking like abbreviation "CAD"
ba06f8bb 458 * bottle.tcl: creates bottle as in OCCT Tutorial
459 * drill.tcl: creates twist drill bit shape
a347ef35 460 * cutter.tcl: creates milling cutter shape
461 * xde.tcl: demonstrates creation of simple assembly in XDE
462 * materials.tcl: demonstrates visual properties of materials supported by 3d viewer
ba06f8bb 463 * raytrace.tcl: demonstrates use of ray tracing display in 3d viewer
a347ef35 464 * dimensions.tcl: demonstrates use of dimensions, clipping, and capping in 3d viewer
ba06f8bb 465
466**Getting Help**
467
4681. Type *help* to see all available commands
4692. Type *help \<command_name\>* to find out the arguments for a given command
470
471@subsection OCCT_OVW_SECTION_7_3 Programming Samples
472
473@subsubsection OCCT_OVW_SECTION_7_3_1 MFC
474
475Visual C++ programming samples containing 10 Visual C++ projects
476illustrating how to use a particular module or functionality.
477
478The list of MFC samples:
479
480 * Geometry
481 * Modeling
482 * Viewer2d
483 * Viewer3d
484 * ImportExport
485 * Ocaf
486 * Triangulation
487 * HLR
488 * Animation
489 * Convert
490
7e3451c7 491@figure{/overview/images/overview_mvc.png}
ba06f8bb 492
493**Remarks:**
494
495 * MFC samples are available only on Windows platform;
496 * To start a sample use Open CASCADE Technology\\Samples\\Mfc\\ item of the Start\\Programs menu;
497 * Read carefully readme.txt to learn about launching and compilation options.
498
499See \subpage samples_mfc_standard "Readme" for details.
500
501@subsubsection OCCT_OVW_SECTION_7_3_2 Qt
502
503OCCT contains three samples based on Qt application framework
504
505 Import Export
506-------------
507
508 Import Export programming sample contains 3D Viewer and Import / Export functionality.
509
7e3451c7 510@figure{/overview/images/overview_qt.png}
ba06f8bb 511
512 Tutorial
513---------
514
515The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
516The purpose of the tutorial is not to explain all OCCT classes but
517to help start thinking in terms of the Open CASCADE Technology.
518
519This tutorial assumes that the user has experience in using and setting up C++.
520From the viewpoint of programming, Open CASCADE Technology is designed
521to enhance user's C++ tools with high performance modeling classes, methods and functions.
522The combination of these resources allows creating substantial applications.
523
524**See also:** @ref occt__tutorial "OCCT Tutorial"
525
ba06f8bb 526**Remarks:**
527
528 * Qt samples are available on all supported platforms;
529 * To start a sample on Windows use Open CASCADE Technology\\Samples\\Qt\\ item of the Start\\Programs menu.
530
531@subsubsection OCCT_OVW_SECTION_7_3_3 C#
532
533C# sample demonstrates integration of OCCT 3D Viewer and Import / Export functionality into .NET applications (using Windows Forms and WPF front ends).
534
7e3451c7 535@figure{/overview/images/overview_c__ie.png}
ba06f8bb 536
537Import:
538
539 * BRep
540 * Iges
541 * Step
542
543Export:
544
545 * Brep
546 * Iges
547 * Step
548 * Stl
549 * Vrml
550
43409819 551See \subpage samples_csharp_occt "C# sample Readme" for details.
15534713 552
18006a0f 553There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
15534713 554
43409819 555See \subpage samples_csharp_direct3d "Direct3D C# sample Readme" for details.
ba06f8bb 556
80eb9670 557@subsubsection OCCT_OVW_SECTION_7_3_4 Android
558
559There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml)
560
561jniviewer
7e3451c7 562@figure{/overview/images/samples_java_android_occt.jpg}
43409819 563Java -- See \subpage samples_java_android_occt "Android Java sample Readme" for details.
80eb9670 564
565AndroidQt
7e3451c7 566@figure{/overview/images/samples_qml_android_occt.jpg}
43409819 567Qt -- See \subpage samples_qml_android_occt "Android Qt sample Readme" for details.
568
569@subsubsection OCCT_OVW_SECTION_7_3_5 iOS
570
571There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework.
572
573@figure{/overview/images/sample_ios_uikit.png}
574
575See \subpage occt_samples_ios_uikit "iOS sample Readme" for details.
565baee6 576
577@subsubsection OCCT_OVW_SECTION_7_3_6 Web
578
579WebGL Viewer sample demonstrating usage of OCCT 3D Viewer in Web browser with Emscripten SDK can be found in `samples/webgl`.
580
581@figure{/overview/images/sample_webgl.png}
582
583See \subpage occt_samples_webgl "WebGL sample Readme" for details.