All demo scripts are shipped with OCCT sources under the resources/samples/tcl directory. To run them:
Source the build environment script env.sh (Linux/macOS) or env.bat (Windows) generated next to DRAWEXE in the build / install bin/ directory.
Launch DRAWEXE.
From the DRAW prompt, source any demo script by absolute or $CASROOT-relative path, for example:
source $env(CASROOT)/resources/samples/tcl/bottle.tcl
A few representative demos:
For the full up-to-date list, see the contents of the resources/samples/tcl/ directory.
Draw is a command interpreter based on TCL and a graphical system used for testing and demonstrating OCCT modeling libraries. It can be used interactively to create, display, and modify objects such as curves, surfaces, and topological shapes. Draw also provides a scriptable environment for OCCT tests and demonstrations.
Draw includes:
Commands grouped in toolkits can be loaded at run time with pload. The plug-in mechanism and instructions for extending Draw are described in @ref occt_user_guides__test_harness. Draw Test Harness is also used by the OCCT automated testing system; see @ref occt_contribution__tests “Automated Test System” for details.
On Linux:
Type pload ALL
On Windows:
Launch Draw executable from Open CASCADE Technology\DRAW Test Harness item of the Start\Programs menu. The Draw[1]> prompt appears in the command window.
Type pload ALL
Creating your first geometric objects
Manipulating the view
Running demonstration files
Use source $env(CASROOT)/resources/samples/tcl/<demo_file> from the DRAW prompt, replacing <demo_file> with the name of the demonstration script.
Getting Help