0024722: Move functionality of WOK command wgendoc to OCCT tool gendoc
[occt.git] / dox / user_guides / draw_test_harness.md
CommitLineData
ba06f8bb 1Draw Test Harness {#occt_user_guides__test_harness}
72b7576f 2===============================
e5bd0d98 3
4@tableofcontents
72b7576f 5
e5bd0d98 6@section occt_draw_1 Introduction
72b7576f 7
8This manual explains how to use Draw, the test harness for Open CASCADE Technology (**OCCT**). It provides basic documentation on using Draw. For advanced information on Draw and its applications, see our offerings on our web site at <a href="http://www.opencascade.org/support/training">http://www.opencascade.org/support/training</a>
9
10Draw is a command interpreter based on TCL and a graphical system used to test and demonstrate Open CASCADE Technology modeling libraries.
11
12
e5bd0d98 13@subsection occt_draw_1_1 Overview
72b7576f 14
15Draw 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.
16
17Draw can be used interactively to create, display and modify objects such as curves, surfaces and topological shapes.
18
19Scripts may be written to customize Draw and perform tests. New types of objects and new commands may be added using the C++ programing language.
20
21Draw consists of:
22
23 * A command interpreter based on the TCL command language.
24 * A 3d graphic viewer based on the X system.
25 * A basic set of commands covering scripts, variables and graphics.
26 * A set of geometric commands allowing the user to create and modify curves and surfaces and to use OCCT geometry algorithms. This set of commands is optional.
27 * A set of topological commands allowing the user to create and modify BRep shapes and to use the OCCT topology algorithms.
28
29
30There is also a set of commands for each delivery unit in the modeling libraries:
31
e5bd0d98 32 * GEOMETRY,
33 * TOPOLOGY,
34 * ADVALGOS,
35 * GRAPHIC,
36 * PRESENTATION.
72b7576f 37
38
e5bd0d98 39@subsection occt_draw_1_2 Contents of this documentation
72b7576f 40
41This documentation describes:
42
43 * The command language.
44 * The basic set of commands.
45 * The graphical commands.
46 * The Geometry set of commands.
47 * The Topology set of commands.
48
49This document does not describe other sets of commands and does not explain how to extend Draw using C++.
50
51This document is a reference manual. It contains a full description of each command. All descriptions have the format illustrated below for the exit command.
72b7576f 52
e5bd0d98 53~~~~~
54exit
55~~~~~
72b7576f 56
57Terminates the Draw, TCL session. If the commands are read from a file using the source command, this will terminate the file.
58
e5bd0d98 59**Example:**
72b7576f 60
e5bd0d98 61~~~~~
72b7576f 62# this is a very short example
63exit
e5bd0d98 64~~~~~
72b7576f 65
66
e5bd0d98 67@subsection occt_draw_1_3 Getting started
72b7576f 68
69Install Draw and launch Emacs. Get a command line in Emacs using *Esc x *and key in *woksh*.
70
e5bd0d98 71All DRAW Test Harness can be activated in the common executable called **DRAWEXE**. They are grouped in toolkits and can be loaded at run-time thereby implementing dynamically loaded plug-ins. Thus, it is possible to work only with the required commands adding them dynamically without leaving the Test Harness session.
72b7576f 72
e5bd0d98 73Declaration 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.
72b7576f 74
e5bd0d98 75@subsubsection occt_draw_1_3_1 Launching DRAW Test Harness
72b7576f 76
ba06f8bb 77Test Harness executable *DRAWEXE* is located in the <i>$CASROOT/\<platform\>/bin</i> directory (where \<platform\> is Win for Windows and Linux for Linux operating systems). Prior to launching it is important to make sure that the environment is correctly set-up (usually this is done automatically after the installation process on Windows or after launching specific scripts on Linux).
72b7576f 78
72b7576f 79
e5bd0d98 80@subsubsection occt_draw_1_3_2 Plug-in resource file
72b7576f 81
e5bd0d98 82Open CASCADE Technology is shipped with the DrawPlugin resource file located in the <i>$CASROOT/src/DrawResources</i> directory.
72b7576f 83
e5bd0d98 84The format of the file is compliant with standard Open CASCADE Technology resource files (see the *Resource_Manager.cdl* file for details).
72b7576f 85
86Each key defines a sequence of either further (nested) keys or a name of the dynamic library. Keys can be nested down to an arbitrary level. However, cyclic dependencies between the keys are not checked.
e5bd0d98 87
88**Example:** (excerpt from DrawPlugin):
72b7576f 89~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
dba69de2 90OCAF : VISUALIZATION, OCAFKERNEL
91VISUALIZATION : AISV
92OCAFKERNEL : DCAF
72b7576f 93
dba69de2 94DCAF : TKDCAF
95AISV : TKViewerTest
72b7576f 96~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97
e5bd0d98 98@subsubsection occt_draw_1_3_3 Activation of commands implemented in the plug-in
72b7576f 99
100To load a plug-in declared in the resource file and to activate the commands the following command must be used in Test Harness:
101
e5bd0d98 102~~~~~
103pload [-PluginFileName] [[Key1] [Key2]...]
104~~~~~
105
bf62b306 106where:
72b7576f 107
bf62b306 108* <i>-PluginFileName</i> - 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.
e5bd0d98 109* *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).
72b7576f 110
e5bd0d98 111According 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 <i>$CASROOT/src/DrawResources</i> directory.
72b7576f 112
e5bd0d98 113~~~~~
dba69de2 114Draw[] pload -DrawPlugin OCAF
e5bd0d98 115~~~~~
116This 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 <i>$CASROOT/src/DrawResources</i> 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.
72b7576f 117
e5bd0d98 118~~~~~
dba69de2 119Draw[] pload (equivalent to pload -DrawPlugin DEFAULT).
e5bd0d98 120~~~~~
121This command will find the default DrawPlugin file and the DEFAULT key. The latter finally maps to the TKTopTest toolkit which implements basic modeling commands.
72b7576f 122
123
e5bd0d98 124@section occt_draw_2 The Command Language
72b7576f 125
e5bd0d98 126@subsection occt_draw_2_1 Overview
72b7576f 127
e5bd0d98 128The 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.
72b7576f 129
130This chapter is designed to give you a short outline of both the TCL language and some extensions included in Draw. The following topics are covered:
131
132 * Syntax of the TCL language.
133 * Accessing variables in TCL and Draw.
134 * Control structures.
135 * Procedures.
136
e5bd0d98 137@subsection occt_draw_2_2 Syntax of TCL
72b7576f 138
139TCL 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.
140
141The basic program for TCL is a script. A script consists of one or more commands. Commands are separated by new lines or semicolons.
e5bd0d98 142
72b7576f 143~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
144set a 24
145set b 15
146set a 25; set b 15
147~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 148
72b7576f 149Each command consists of one or more *words*; the first word is the name of a command and additional words are arguments to that command.
150
151Words are separated by spaces or tabs. In the preceding example each of the four commands has three words. A command may contain any number of words and each word is a string of arbitrary length.
152
153The evaluation of a command by TCL is done in two steps. In the first step, the command is parsed and broken into words. Some substitutions are also performed. In the second step, the command procedure corresponding to the first word is called and the other words are interpreted as arguments. In the first step, there is only string manipulation, The words only acquire *meaning* in the second step by the command procedure.
154
155The following substitutions are performed by TCL:
156
e5bd0d98 157Variable substitution is triggered by the $ character (as with csh), the content of the variable is substitued; { } may be used as in csh to enclose the name of the variable.
158
159**Example:**
72b7576f 160~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
161# set a variable value
162set file documentation
163puts $file #to display file contents on the screen
164
165# a simple substitution, set psfile to documentation.ps
166set psfile $file.ps
167puts $psfile
168
169# another substitution, set pfile to documentationPS
170set pfile ${file}PS
171
172# a last one,
173# delete files NEWdocumentation and OLDdocumentation
174foreach prefix {NEW OLD} {rm $prefix$file}
175~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 176
177Command substitution is triggered by the [ ] characters. The brackets must enclose a valid script. The script is evaluated and the result is substituted.
178
72b7576f 179Compare command construction in csh.
180
e5bd0d98 181**Example:**
72b7576f 182~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
183set degree 30
184set pi 3.14159265
185# expr is a command evaluating a numeric expression
186set radian [expr $pi*$degree/180]
187~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 188
189Backslash substitution is triggered by the backslash character. It is used to insert special characters like $, [ , ] , etc. It is also useful to insert a new line, a backslash terminated line is continued on the following line.
190
72b7576f 191TCL uses two forms of *quoting* to prevent substitution and word breaking.
192
e5bd0d98 193Double quote *quoting* enables the definition of a string with space and tabs as a single word. Substitutions are still performed inside the inverted commas " ".
72b7576f 194
e5bd0d98 195**Example:**
72b7576f 196~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
197# set msg to ;the price is 12.00;
198set price 12.00
199set msg ;the price is $price;
200~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 201
202Braces *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.
203
204**Example:**
72b7576f 205~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
206set x 0
207# this will loop for ever
208# because while argument is ;0 3;
209while ;$x 3; {set x [expr $x+1]}
210# this will terminate as expected because
211# while argument is {$x 3}
212while {$x 3} {set x [expr $x+1]}
213# this can be written also
214while {$x 3} {
215set x [expr $x+1]
216}
217# the following cannot be written
218# because while requires two arguments
219while {$x 3}
220{
221set x [expr $x+1]
222}
223~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 224
225Comments 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.
226
227**Example:**
72b7576f 228~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
229# This is a comment
230set a 1 # this is not a comment
231set b 1; # this is a comment
232~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 233
e5bd0d98 234The 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.
72b7576f 235
e5bd0d98 236
237**Example:**
72b7576f 238~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239# I want to delete two files
240
241set files ;foo bar;
242
243# this will fail because rm will receive only one argument
244# and complain that ;foo bar; does not exit
245
246exec rm $files
247
248# a second evaluation will do it
249~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
250
e5bd0d98 251@subsection occt_draw_2_3 Accessing variables in TCL and Draw
72b7576f 252
e5bd0d98 253TCL 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.
72b7576f 254
255TCL provides a mechanism to link user data to variables. Using this functionality, Draw defines its variables as TCL variables with associated data.
256
bf62b306 257The string value of a Draw variable is meaningless. It is usually set to the name of the variable itself. Consequently, preceding a Draw variable with a <i>$</i> does not change the result of a command. The content of a Draw variable is accessed using appropriate commands.
72b7576f 258
259There are many kinds of Draw variables, and new ones may be added with C++. Geometric and topological variables are described below.
260
bf62b306 261Draw 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.
72b7576f 262
e5bd0d98 263**Example:**
72b7576f 264~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
265# dset is used for numeric variables
266# pi is a predefined Draw variable
267dset angle pi/3 radius 10
268point p radius*cos(angle) radius*sin(angle) 0
269~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bf62b306 270It 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.
e5bd0d98 271
272@subsubsection occt_draw_2_3_1 set, unset
72b7576f 273
e5bd0d98 274Syntax:
72b7576f 275
e5bd0d98 276~~~~~
277set varname [value]
72b7576f 278unset varname [varname varname ...]
e5bd0d98 279~~~~~
280
bf62b306 281*set* assigns a string value to a variable. If the variable does not already exist, it is created.
72b7576f 282
bf62b306 283Without a value, *set* returns the content of the variable.
72b7576f 284
bf62b306 285*unset* deletes variables. It is is also used to delete Draw variables.
72b7576f 286
e5bd0d98 287**Example:**
72b7576f 288~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
e5bd0d98 289set a "Hello world"
290set b "Goodbye"
72b7576f 291set a
e5bd0d98 292== "Hello world"
72b7576f 293unset a b
294set a
295~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
296
e5bd0d98 297**Note**, that the *set* command can set only one variable, unlike the *dset* command.
72b7576f 298
72b7576f 299
e5bd0d98 300@subsubsection occt_draw_2_3_2 dset, dval
72b7576f 301
e5bd0d98 302Syntax
72b7576f 303
e5bd0d98 304~~~~~
305dset var1 value1 vr2 value2 ...
72b7576f 306dval name
e5bd0d98 307~~~~~
72b7576f 308
e5bd0d98 309*dset* assigns values to Draw numeric variables. The argument can be any numeric expression including Draw numeric variables. Since all Draw commands expect a numeric expression, there is no need to use $ or *expr*. The *dset* command can assign several variables. If there is an odd number of arguments, the last variable will be assigned a value of 0. If the variable does not exist, it will be created.
72b7576f 310
e5bd0d98 311*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.
312
313
314**Example:**
72b7576f 315~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
316# z is set to 0
317dset x 10 y 15 z
318== 0
319
320# no $ required for Draw commands
321point p x y z
322
323# *puts* prints a string
324puts ;x = [dval x], cos(x/pi) = [dval cos(x/pi)];
325== x = 10, cos(x/pi) = -0.99913874099467914
326~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 327
e5bd0d98 328**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. <i>(a + b)</i> is parsed as three words: <i>"(a + b)"</i> or <i>(a+b)</i> are correct.*
72b7576f 329
330
e5bd0d98 331@subsection occt_draw_2_4 lists
72b7576f 332
333TCL 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.
334
335This allows you to insert lists within lists.
e5bd0d98 336
337**Example:**
72b7576f 338~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
339# a list of 3 strings
340;a b c;
341
342# a list of two strings the first is a list of 2
343;{a b} c;
344~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 345
e5bd0d98 346Many TCL commands return lists and **foreach** is a useful way to create loops on list elements.
347
348@subsubsection occt_draw_2_5 Control Structures
72b7576f 349
350TCL 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:
351
e5bd0d98 352* You use braces instead of parentheses to enclose conditions.
353* You do not start the script on the next line of your command.
354
355
356@subsubsection occt_draw_2_5_1 if
357
358Syntax
359
360~~~~~
361if condition script [elseif script .... else script]
362~~~~~
72b7576f 363
e5bd0d98 364**If** evaluates the condition and the script to see whether the condition is true.
72b7576f 365
72b7576f 366
72b7576f 367
e5bd0d98 368**Example:**
72b7576f 369~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
370if {$x 0} {
371puts ;positive;
372} elseif {$x == 0} {
373puts ;null;
374} else {
375puts ;negative;
376}
377~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378
e5bd0d98 379@subsubsection occt_draw_2_5_2 while, for, foreach
72b7576f 380
e5bd0d98 381Syntax:
382
383
384~~~~~~
385while condition script
72b7576f 386for init condition reinit script
387foreach varname list script
e5bd0d98 388~~~~~
389
390The 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. \
72b7576f 391
e5bd0d98 392**Example:**
72b7576f 393~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
394# while example
395dset x 1.1
396while {[dval x] 100} {
397 circle c 0 0 x
398 dset x x*x
399}
400# for example
401# incr var d, increments a variable of d (default 1)
402for {set i 0} {$i 10} {incr i} {
403 dset angle $i*pi/10
404 point p$i cos(angle0 sin(angle) 0
405}
406# foreach example
407foreach object {crapo tomson lucas} {display $object}
408~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 409
e5bd0d98 410@subsubsection occt_draw_2_5_3 break, continue
72b7576f 411
e5bd0d98 412Syntax:
72b7576f 413
e5bd0d98 414~~~~~
415break
72b7576f 416continue
e5bd0d98 417~~~~~
72b7576f 418
e5bd0d98 419Within loops, the **break** and **continue** commands have the same effect as in C.
72b7576f 420
e5bd0d98 421**break** interrupts the innermost loop and **continue** jumps to the next iteration.
422
423**Example:**
72b7576f 424~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
425# search the index for which t$i has value ;secret;
426for {set i 1} {$i = 100} {incr i} {
427 if {[set t$i] == ;secret;} break;
428}
429~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 430
e5bd0d98 431@subsection occt_draw_2_6 Procedures
432
433TCL 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.
72b7576f 434
435The only problematic aspect of procedures is that variables are strictly local, and as they are implicitly created when used, it may be difficult to detect errors.
436
e5bd0d98 437There are two means of accessing a variable outside the scope of the current procedures: **global** declares a global variable (a variable outside all procedures); **upvar** accesses a variable in the scope of the caller. Since arguments in TCL are always string values, the only way to pass Draw variables is by reference, i.e. passing the name of the variable and using the **upvar** command as in the following examples.
438
439As 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.
72b7576f 440
72b7576f 441
e5bd0d98 442@subsubsection occt_draw_2_6_1 proc
72b7576f 443
e5bd0d98 444Syntax:
72b7576f 445
e5bd0d98 446~~~~~
447proc argumentlist script
448~~~~~
72b7576f 449
e5bd0d98 450**proc** defines a procedure. An argument may have a default value. It is then a list of the form {argument value}. The script is the body of the procedure.
72b7576f 451
e5bd0d98 452**return** gives a return value to the procedure.
453
454**Example:**
72b7576f 455~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
456# simple procedure
457proc hello {} {
458 puts ;hello world;
459}
460# procedure with arguments and default values
461proc distance {x1 y1 {x2 0} {y2 0}} {
462 set d [expr (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)]
463 return [expr sqrt(d)]
464}
465proc fact n {
466 if {$n == 0} {return 1} else {
467 return [expr n*[fact [expr n -1]]]
468 }
469}
470~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 471
472
e5bd0d98 473@subsubsection occt_draw_2_6_2 global, upvar
474
475Syntax:
72b7576f 476
e5bd0d98 477~~~~~
478global varname [varname ...]
72b7576f 479upvar varname localname [varname localname ...]
e5bd0d98 480~~~~~
72b7576f 481
72b7576f 482
e5bd0d98 483**global** accesses high level variables. Unlike C, global variables are not visible in procedures.
72b7576f 484
e5bd0d98 485**upvar** gives a local name to a variable in the caller scope. This is useful when an argument is the name of a variable instead of a value. This is a call by reference and is the only way to use Draw variables as arguments.
486
487**Note** that in the following examples the \$ character is always necessarily used to access the arguments.
488
489**Example:**
72b7576f 490~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
491# convert degree to radian
492# pi is a global variable
493proc deg2rad (degree} {
494 return [dval pi*$degree/2.]
495}
496# create line with a point and an angle
497proc linang {linename x y angle} {
498 upvar linename l
499 line l $x $y cos($angle) sin($angle)
500}
501~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
502
e5bd0d98 503@section occt_draw_3 Basic Commands
72b7576f 504
505This 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:
506
507 * General commands, which are used for Draw and TCL management.
508 * Variable commands, which are used to manage Draw variables such as storing and dumping.
509 * Graphic commands, which are used to manage the graphic system, and so pertain to views.
510 * Variable display commands, which are used to manage the display of objects within given views.
511
e5bd0d98 512Note that Draw also features a GUI task bar providing an alternative way to give certain general, graphic and display commands
72b7576f 513
514
e5bd0d98 515@subsection occt_draw_3_1 General commands
72b7576f 516
e5bd0d98 517This section describes several useful commands:
72b7576f 518
e5bd0d98 519 * **help** to get information,
520 * **source** to eval a script from a file,
521 * **spy** to capture the commands in a file,
522 * **cpulimit** to limit the process cpu time,
523 * **wait** to waste some time,
524 * **chrono** to time commands.
72b7576f 525
e5bd0d98 526@subsubsection occt_draw_3_1_1 help
72b7576f 527
e5bd0d98 528Syntax:
72b7576f 529
e5bd0d98 530~~~~~
531help [command [helpstring group]]
532~~~~~
72b7576f 533
534Provides help or modifies the help information.
535
e5bd0d98 536**help** without arguments lists all groups and the commands in each group.
72b7576f 537
e5bd0d98 538Specifying 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.
539
540**Example:**
72b7576f 541~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
542# Gives help on all commands starting with *a*
543~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 544
72b7576f 545
e5bd0d98 546@subsubsection occt_draw_3_1_2 source
547
548Syntax:
549
550~~~~~
551source filename
552~~~~~
72b7576f 553Executes a file.
554
e5bd0d98 555The **exit** command will terminate the file.
72b7576f 556
e5bd0d98 557@subsubsection occt_draw_3_1_3 spy
72b7576f 558
e5bd0d98 559Syntax:
72b7576f 560
e5bd0d98 561~~~~~
562spy [filename]
563~~~~~
72b7576f 564
e5bd0d98 565Saves interactive commands in the file. If spying has already been performed, the current file is closed. **spy** without an argument closes the current file and stops spying. If a file already exists, the file is overwritten. Commands are not appended.
72b7576f 566
72b7576f 567If a command returns an error it is saved with a comment mark.
568
e5bd0d98 569The file created by **spy** can be executed with the **source** command.
570
571**Example:**
72b7576f 572~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
573# all commands will be saved in the file ;session;
574spy session
575# the file ;session; is closed and commands are not saved
576spy
577~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 578
579
72b7576f 580
e5bd0d98 581@subsubsection occt_draw_3_1_4 cpulimit
582
583Syntax:
72b7576f 584
e5bd0d98 585~~~~~
586cpulimit [nbseconds]
587~~~~~
588
589**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.
590
591**Example:**
72b7576f 592~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
593#limit cpu to one hour
594cpulimit 3600
595~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
596
e5bd0d98 597@subsubsection occt_draw_3_1_5 wait
72b7576f 598
e5bd0d98 599Syntax:
600~~~~~
601wait [nbseconds]
602~~~~~
72b7576f 603Suspends 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.
604
e5bd0d98 605~~~~~
72b7576f 606# You have ten seconds ...
607wait
e5bd0d98 608~~~~~
72b7576f 609
e5bd0d98 610@subsubsection occt_draw_3_1_6 chrono
72b7576f 611
e5bd0d98 612Syntax:
72b7576f 613
e5bd0d98 614~~~~~
615chrono [ name start/stop/reset/show]
616~~~~~
72b7576f 617
e5bd0d98 618Without arguments, **chrono** activates Draw chronometers. The elapsed time ,cpu system and cpu user times for each command will be printed.
72b7576f 619
e5bd0d98 620With arguments, **chrono** is used to manage activated chronometers. You can perform the following actions with a chronometer.
72b7576f 621 * run the chronometer (start).
622 * stop the chronometer (stop).
623 * reset the chronometer to 0 (reset).
624 * display the current time (show).
625
e5bd0d98 626**Example:**
72b7576f 627~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
628chrono
629==Chronometers activated.
630ptorus t 20 5
631==Elapsed time: 0 Hours 0 Minutes 0.0318 Seconds
632==CPU user time: 0.01 seconds
633==CPU system time: 0 seconds
634~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
635
e5bd0d98 636@subsection occt_draw_3_2 Variable management commands
72b7576f 637
e5bd0d98 638@subsubsection occt_draw_3_2_1 isdraw, directory
72b7576f 639
e5bd0d98 640Syntax:
641~~~~~
642isdraw varname
72b7576f 643directory [pattern]
e5bd0d98 644~~~~~
645
646**isdraw** tests to see if a variable is a Draw variable. **isdraw** will return 1 if there is a Draw value attached to the variable.
72b7576f 647
e5bd0d98 648Use **directory** to return a list of all Draw global variables matching a pattern.
72b7576f 649
e5bd0d98 650**Example:**
72b7576f 651~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
652set a 1
653isdraw a
654=== 0
655
656dset a 1
657isdraw a
658=== 1
659
660circle c 0 0 1 0 5
661isdraw c
662=== 1
663
664# to destroy all Draw objects with name containing curve
665foreach var [directory *curve*] {unset $var}
666~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 667
668
e5bd0d98 669@subsubsection occt_draw_3_2_2 whatis, dump
72b7576f 670
e5bd0d98 671Syntax:
672
673~~~~~
674whatis varname [varname ...]
72b7576f 675dump varname [varname ...]
e5bd0d98 676~~~~~
72b7576f 677
e5bd0d98 678**whatis** returns short information about a Draw variable. This is usually the type name.
72b7576f 679
e5bd0d98 680**dump** returns a brief type description, the coordinates, and if need be, the parameters of a Draw variable.
72b7576f 681
e5bd0d98 682**Example:**
72b7576f 683~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
684circle c 0 0 1 0 5
685whatis c
686c is a 2d curve
687
688dump c
689
690***** Dump of c *****
691Circle
692Center :0, 0
693XAxis :1, 0
694YAxis :-0, 1
695Radius :5
696~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 697
698**Note** The behavior of *whatis* on other variables (not Draw) is not excellent.
72b7576f 699
700
e5bd0d98 701@subsubsection occt_draw_3_2_3 rename, copy
72b7576f 702
e5bd0d98 703Syntax:
704~~~~~
705rename varname tovarname [varname tovarname ...]
72b7576f 706copy varname tovarname [varname tovarname ...]
e5bd0d98 707~~~~~
72b7576f 708
e5bd0d98 709 * **rename** 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.
710 * **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.
72b7576f 711
e5bd0d98 712**Example:**
72b7576f 713~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
714circle c1 0 0 1 0 5
715rename c1 c2
716
717# curves are copied, c2 will not be modified
718copy c2 c3
719~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
720
e5bd0d98 721@subsubsection occt_draw_3_2_4 datadir, save, restore
72b7576f 722
e5bd0d98 723Syntax:
724~~~~~
725datadir [directory]
72b7576f 726save variable [filename]
727restore filename [variablename]
e5bd0d98 728~~~~~
72b7576f 729
e5bd0d98 730 * **datadir** without arguments prints the path of the current data directory.
731 * **datadir** with an argument sets the data directory path. \
72b7576f 732
e5bd0d98 733If the path starts with a dot (.) only the last directory name will be changed in the path.
72b7576f 734
e5bd0d98 735 * **save** writes a file in the data directory with the content of a variable. By default the name of the file is the name of the variable. To give a different name use a second argument.
736 * **restore** reads the content of a file in the data directory in a local variable. By default, the name of the variable is the name of the file. To give a different name, use a second argument.
72b7576f 737
738The exact content of the file is type-dependent. They are usually ASCII files and so, architecture independent.
e5bd0d98 739
740**Example:**
72b7576f 741~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
742# note how TCL accesses shell environment variables
743# using $env()
744datadir
745==.
746
747datadir $env(WBCONTAINER)/data/default
748==/adv_20/BAG/data/default
749
750box b 10 20 30
751save b theBox
752==/adv_20/BAG/data/default/theBox
753
754# when TCL does not find a command it tries a shell command
755ls [datadir]
756== theBox
757
758restore theBox
759== theBox
760~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 761
e5bd0d98 762@subsection occt_draw_3_3 User defined commands
72b7576f 763
bf62b306 764*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.
72b7576f 765
bf62b306 766*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.
72b7576f 767
e5bd0d98 768@subsubsection occt_draw_3_3_1 set
769
770#### In *DrawTrSurf* package:
72b7576f 771
e5bd0d98 772~~~~~
bf62b306 773void Set(Standard_CString& Name,const gp_Pnt& G) ;
774void Set(Standard_CString& Name,const gp_Pnt2d& G) ;
775void Set(Standard_CString& Name,
776const Handle(Geom_Geometry)& G) ;
777void Set(Standard_CString& Name,
778const Handle(Geom2d_Curve)& C) ;
779void Set(Standard_CString& Name,
780const Handle(Poly_Triangulation)& T) ;
781void Set(Standard_CString& Name,
782const Handle(Poly_Polygon3D)& P) ;
783void Set(Standard_CString& Name,
784const Handle(Poly_Polygon2D)& P) ;
e5bd0d98 785~~~~~
72b7576f 786
e5bd0d98 787#### In *DBRep* package:
72b7576f 788
e5bd0d98 789~~~~~
72b7576f 790void Set(const Standard_CString Name,
bf62b306 791const TopoDS_Shape& S) ;
e5bd0d98 792~~~~~
72b7576f 793
e5bd0d98 794Example of *DrawTrSurf*
72b7576f 795
e5bd0d98 796~~~~~
72b7576f 797Handle(Geom2d_Circle) C1 = new Geom2d_Circle
798(gce_MakeCirc2d (gp_Pnt2d(50,0,) 25));
799DrawTrSurf::Set(char*, C1);
e5bd0d98 800~~~~~
72b7576f 801
e5bd0d98 802Example of *DBRep*
72b7576f 803
e5bd0d98 804~~~~~
72b7576f 805TopoDS_Solid B;
806B = BRepPrimAPI_MakeBox (10,10,10);
807DBRep::Set(char*,B);
e5bd0d98 808~~~~~
72b7576f 809
e5bd0d98 810@subsubsection occt_draw_3_3_2 get
72b7576f 811
e5bd0d98 812#### In *DrawTrSurf* package:
813
814~~~~~
bf62b306 815Handle_Geom_Geometry Get(Standard_CString& Name) ;
e5bd0d98 816~~~~~
72b7576f 817
e5bd0d98 818#### In *DBRep* package:
72b7576f 819
e5bd0d98 820~~~~~
bf62b306 821TopoDS_Shape Get(Standard_CString& Name,
72b7576f 822const TopAbs_ShapeEnum Typ = TopAbs_SHAPE,
823const Standard_Boolean Complain
824= Standard_True) ;
e5bd0d98 825~~~~~
72b7576f 826
e5bd0d98 827Example of *DrawTrSurf*
828
829~~~~~
72b7576f 830Standard_Integer MyCommand
bf62b306 831(Draw_Interpretor& theCommands,
72b7576f 832Standard_Integer argc, char** argv)
833{......
834// Creation of a Geom_Geometry from a Draw geometric
835// name
836Handle (Geom_Geometry) aGeom= DrawTrSurf::Get(argv[1]);
837}
e5bd0d98 838~~~~~
72b7576f 839
e5bd0d98 840Example of *DBRep*
72b7576f 841
e5bd0d98 842~~~~~
72b7576f 843Standard_Integer MyCommand
bf62b306 844(Draw_Interpretor& theCommands,
72b7576f 845Standard_Integer argc, char** argv)
846{......
847// Creation of a TopoDS_Shape from a Draw topological
848// name
849TopoDS_Solid B = DBRep::Get(argv[1]);
850}
e5bd0d98 851~~~~~
72b7576f 852
e5bd0d98 853@section occt_draw_4 Graphic Commands
72b7576f 854
855Graphic 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.
856
e5bd0d98 857@subsection occt_draw_4_1 Axonometric viewer
72b7576f 858
e5bd0d98 859@subsubsection occt_draw_4_1_1 view, delete
72b7576f 860
e5bd0d98 861Syntax:
862~~~~~
863view index type [X Y W H]
72b7576f 864delete [index]
e5bd0d98 865~~~~~
72b7576f 866
e5bd0d98 867**view** is the basic view creation command: it creates a new view with the given index. If a view with this index already exits, it is deleted. The view is created with default parameters and X Y W H are the position and dimensions of the window on the screen. Default values are 0, 0, 500, 500.
72b7576f 868
e5bd0d98 869As a rule it is far simpler either to use the procedures **axo**, **top**, **left** or to click on the desired view type in the menu under *Views* in the task bar..
72b7576f 870
e5bd0d98 871**delete** deletes a view. If no index is given, all the views are deleted.
72b7576f 872
873Type selects from the following range:
874
e5bd0d98 875 * *AXON* : Axonometric view
876 * *PERS* : Perspective view
bf62b306 877 * <i>+X+Y</i> : View on both axes (i.e. a top view), other codes are <i>-X+Y</i>, <i>+Y-Z</i>, etc.
878 * <i>-2D-</i> : 2d view
72b7576f 879
880The index, the type, the current zoom are displayed in the window title .
e5bd0d98 881
882**Example:**
72b7576f 883~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
884# this is the content of the mu4 procedure
885proc mu4 {} {
886delete
887view 1 +X+Z 320 20 400 400
888view 2 +X+Y 320 450 400 400
889view 3 +Y+Z 728 20 400 400
890view 4 AXON 728 450 400 400
891}
892~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 893
72b7576f 894See also: **axo, pers, top, bottom, left, right, front, back, mu4, v2d, av2d, smallview**
895
e5bd0d98 896@subsubsection occt_draw_4_1_2 axo, pers, top, ...
897
898Syntax:
72b7576f 899
e5bd0d98 900~~~~~
901axo
72b7576f 902pers
903...
904smallview type
e5bd0d98 905~~~~~
72b7576f 906
907All these commands are procedures used to define standard screen layout. They delete all existing views and create new ones. The layout usually complies with the European convention, i.e. a top view is under a front view.
908
e5bd0d98 909 * **axo** creates a large window axonometric view;
910 * **pers** creates a large window perspective view;
911 * **top**, **bottom**, **left**, **right**, **front**, **back** create a large window axis view;
912 * **mu4** creates four small window views: front, left, top and axo.
913 * **v2d** creates a large window 2d view.
914 * **av2d** creates two small window views, one 2d and one axo
915 * **smallview** creates a view at the bottom right of the screen of the given type.
72b7576f 916
917See also: **view**, **delete**
918
e5bd0d98 919@subsubsection occt_draw_4_1_3 mu, md, 2dmu, 2dmd, zoom, 2dzoom
72b7576f 920
e5bd0d98 921Syntax:
72b7576f 922
e5bd0d98 923~~~~~
924 mu [index] value
925 2dmu [index] value
926 zoom [index] value
927 wzoom
928~~~~~
72b7576f 929
e5bd0d98 930* **mu** (magnify up) increases the zoom in one or several views by a factor of 10%.
931* **md** (magnify down) decreases the zoom by the inverse factor. **2dmu** and **2dmd**
72b7576f 932perform the same on one or all 2d views.
e5bd0d98 933* **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.
934* **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.
72b7576f 935
e5bd0d98 936**Example:**
72b7576f 937~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
e5bd0d98 938 # set a zoom of 2.5
939 zoom 2.5
72b7576f 940
e5bd0d98 941 # magnify by 10%
942 mu 1
72b7576f 943
e5bd0d98 944 # magnify by 20%
72b7576f 945~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
946See also: **fit**, **2dfit**
947
948
e5bd0d98 949@subsubsection occt_draw_4_14 pu, pd, pl, pr, 2dpu, 2dpd, 2dpl, 2dpr
72b7576f 950
bf62b306 951Syntax:
952
953~~~~~
954pu [index]
72b7576f 955pd [index]
bf62b306 956~~~~~
72b7576f 957
bf62b306 958The <i>p_</i> 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.
959~~~~~
960# you have selected one anonometric view
961pu
962# or
963pu 1
72b7576f 964
bf62b306 965# you have selected an mu4 view; the object in the third view will pan up
966pu 3
967~~~~~
72b7576f 968See also: **fit**, **2dfit**
969
970
e5bd0d98 971@subsubsection occt_draw_4_1_5 fit, 2dfit
972
973Syntax:
72b7576f 974
e5bd0d98 975~~~~~
976fit [index]
72b7576f 9772dfit [index]
e5bd0d98 978~~~~~
72b7576f 979
e5bd0d98 980**fit** computes the best zoom and pans on the content of the view. The content of the view will be centered and fit the whole window.
72b7576f 981
982When fitting all views a unique zoom is computed for all the views. All views are on the same scale.
983
e5bd0d98 984**Example:**
72b7576f 985~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
986# fit only view 1
987fit 1
988# fit all 2d views
9892dfit
990~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
991See also: **zoom**, **mu**, **pu**
992
993
e5bd0d98 994@subsubsection occt_draw_4_1_6 u, d, l, r
72b7576f 995
e5bd0d98 996Syntax:
997
998~~~~~
999u [index]
72b7576f 1000d [index]
1001l [index]
1002r [index]
e5bd0d98 1003~~~~~
72b7576f 1004
e5bd0d98 1005**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.
72b7576f 1006
e5bd0d98 1007**Example:**
72b7576f 1008~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1009# rotate the view up
1010u
1011~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1012
e5bd0d98 1013@subsubsection occt_draw_4_1_7 focal, fu, fd
72b7576f 1014
e5bd0d98 1015Syntax:
1016~~~~~
1017focal [f]
72b7576f 1018fu [index]
1019fd [index]
e5bd0d98 1020~~~~~
1021
1022* **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.
1023* **fu** and **fd** increase or decrease the focal value by 10%. **fd** makes the eye closer to the object.
72b7576f 1024
e5bd0d98 1025**Example:**
72b7576f 1026~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1027pers
1028repeat 10 fd
1029~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 1030
1031**Note**: Do not use a negative or null focal value.
72b7576f 1032
1033See also: **pers**
1034
e5bd0d98 1035@subsubsection occt_draw_4_1_8 color
1036
1037Syntax:
72b7576f 1038
e5bd0d98 1039~~~~~
1040color index name
1041~~~~~
72b7576f 1042
e5bd0d98 1043**color** sets the color to a value. The index of the *color* is a value between 0 and 15. The name is an X window color name. The list of these can be found in the file *rgb.txt* in the X library directory.
72b7576f 1044
e5bd0d98 1045The 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.
72b7576f 1046
e5bd0d98 1047**Example:**
72b7576f 1048~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1049# change the value of blue
e5bd0d98 1050color 3 "navy blue"
72b7576f 1051~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1052
1053
e5bd0d98 1054**Note** that the color change will be visible on the next redraw of the views, for example, after *fit* or *mu*, etc.
1055
1056@subsubsection occt_draw_4_1_9 dtext
72b7576f 1057
e5bd0d98 1058Syntax:
1059~~~~~
1060dtext [x y [z]] string
1061~~~~~
72b7576f 1062
e5bd0d98 1063**dtext** displays a string in all 3d or 2d views. If no coordinates are given, a graphic selection is required. If two coordinates are given, the text is created in a 2d view at the position specified. With 3 coordinates, the text is created in a 3d view.
72b7576f 1064
1065The coordinates are real space coordinates.
1066
e5bd0d98 1067**Example:**
72b7576f 1068~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1069# mark the origins
1070dtext 0 0 bebop
1071dtext 0 0 0 bebop
1072~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1073
e5bd0d98 1074@subsubsection occt_draw_4_1_10 hardcopy, hcolor, xwd
72b7576f 1075
e5bd0d98 1076Syntax:
1077~~~~~
1078hardcopy [index]
72b7576f 1079hcolor index width gray
1080xwd [index] filename
e5bd0d98 1081~~~~~
72b7576f 1082
e5bd0d98 1083* **hardcopy** creates a postcript file called a4.ps in the current directory. This file contains the postscript description of the view index, and will allow you to print the view.
1084* **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.
1085* **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**.
72b7576f 1086
e5bd0d98 1087**Example:**
72b7576f 1088~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1089# all blue lines (color 3)
1090# will be half-width and gray
1091hcolor 3 0.5
1092
1093# make a postscript file and print it
1094hardcopy
1095lpr a4.ps
1096
1097# make an xwd file and display it
1098xwd theview
1099xwud -in theview
1100~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e5bd0d98 1101
1102**Note:** When more than one view is present, specify the index of the view.
1103
1104Only use a postscript printer to print postscript files.
72b7576f 1105
1106See also: **color**
1107
1108
e5bd0d98 1109@subsubsection occt_draw_4_1_11 wclick, pick
72b7576f 1110
e5bd0d98 1111Syntax:
1112~~~~~
1113wclick
72b7576f 1114pick index X Y Z b [nowait]
e5bd0d98 1115~~~~~
72b7576f 1116
e5bd0d98 1117**wclick** defers an event until the mouse button is clicked. The message <code>just click</code> is displayed.
72b7576f 1118
e5bd0d98 1119Use the **pick** command to get graphic input. The arguments must be names for variables where the results are stored.
72b7576f 1120 * index: index of the view where the input was made.
1121 * X,Y,Z: 3d coordinates in real world.
1122 * b: b is the mouse button 1,2 or 3.
1123
1124When there is an extra argument, its value is not used and the command does not wait for a click; the value of b may then be 0 if there has not been a click.
1125
1126This option is useful for tracking the pointer.
1127
e5bd0d98 1128**Note** that the results are stored in Draw numeric variables.
1129
1130**Example:**
72b7576f 1131~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1132# make a circle at mouse location
1133pick index x y z b
1134circle c x y z 0 0 1 1 0 0 0 30
1135
1136# make a dynamic circle at mouse location
1137# stop when a button is clicked
1138# (see the repaint command)
1139
1140dset b 0
1141while {[dval b] == 0} {
1142pick index x y z b nowait
1143circle c x y z 0 0 1 1 0 0 0 30
1144repaint
1145}
1146~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1147See also: **repaint**
1148
1149
e5bd0d98 1150Draw provides commands to manage the display of objects.
1151* **display**, **donly** are used to display,
1152* **erase**, **clear**, **2dclear** to erase.
1153* **autodisplay** command is used to check whether variables are displayed when created.
72b7576f 1154
e5bd0d98 1155The variable name "." (dot) has a special status in Draw. Any Draw command expecting a Draw object as argument can be passed a dot. The meaning of the dot is the following.
72b7576f 1156 * If the dot is an input argument, a graphic selection will be made. Instead of getting the object from a variable, Draw will ask you to select an object in a view.
1157 * 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.
e5bd0d98 1158 * If you do not see what you expected while executing loops or sourcing files, use the **repaint** and **dflush** commands.
72b7576f 1159
e5bd0d98 1160**Example:**
72b7576f 1161~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1162# OK use dot to dump an object on the screen
1163dump .
1164
1165point . x y z
1166
1167#Not OK. display points on a curve c
1168# with dot no variables are created
1169for {set i 0} {$i = 10} {incr i} {
1170cvalue c $i/10 x y z
1171point . x y z
1172}
1173
1174# point p x y z
1175# would have displayed only one point
1176# because the precedent variable content is erased
1177
1178# point p$i x y z
1179# is an other solution, creating variables
1180# p0, p1, p2, ....
1181
1182# give a name to a graphic object
1183rename . x
1184~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1185
72b7576f 1186
e5bd0d98 1187@subsubsection occt_draw_4_1_12 autodisplay
72b7576f 1188
e5bd0d98 1189Syntax:
1190
1191~~~~~
1192autodisplay [0/1]
1193~~~~~
1194
1195By default, Draw automatically displays any graphic object as soon as it is created. This behavior known as autodisplay can be removed with the command **autodisplay**. Without arguments, **autodisplay** toggles the autodisplay mode. The command always returns the current mode.
1196
1197When **autodisplay** is off, using the dot return argument is ineffective.
1198
1199**Example:**
72b7576f 1200~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1201# c is displayed
1202circle c 0 0 1 0 5
1203
1204# toggle the mode
1205autodisplay
1206== 0
1207circle c 0 0 1 0 5
1208
1209# c is erased, but not displayed
1210display c
1211~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1212
e5bd0d98 1213@subsubsection occt_draw_4_1_13 display, donly
72b7576f 1214
e5bd0d98 1215Syntax:
1216~~~~~
1217display varname [varname ...]
72b7576f 1218donly varname [varname ...]
e5bd0d98 1219~~~~~
72b7576f 1220
e5bd0d98 1221* **display** makes objects visible.
1222* **donly** *display only* makes objects visible and erases all other objects. It is very useful to extract one object from a messy screen.
72b7576f 1223
e5bd0d98 1224**Example:**
72b7576f 1225~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
e5bd0d98 1226\# to see all objects
72b7576f 1227foreach var [directory] {display $var}
1228
e5bd0d98 1229\# to select two objects and erase the other ones
72b7576f 1230donly . .
1231~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1232
1233
e5bd0d98 1234@subsubsection occt_draw_4_1_14 erase, clear, 2dclear
1235
1236Syntax:
72b7576f 1237
e5bd0d98 1238~~~~~
1239erase [varname varname ...]
72b7576f 1240clear
12412dclear
e5bd0d98 1242~~~~~
72b7576f 1243
e5bd0d98 1244**erase** removes objects from all views. **erase** without arguments erases everything in 2d and 3d.
72b7576f 1245
e5bd0d98 1246**clear** erases only 3d objects and **2dclear** only 2d objects. **erase** without arguments is similar to **clear; 2dclear**.
1247
1248
1249**Example:**
72b7576f 1250~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1251# erase eveerything with a name starting with c_
1252foreach var [directory c_*] {erase $var}
1253
1254# clear 2d views
ca0f3082 12552dclear
72b7576f 1256~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1257
e5bd0d98 1258@subsubsection occt_draw_4_1_15 repaint, dflush
72b7576f 1259
72b7576f 1260
e5bd0d98 1261Syntax:
1262
1263~~~~~
1264repaint
1265dflush
1266~~~~~
1267
1268* **repaint** forces repainting of views.
1269* **dflush** flushes the graphic buffers.
72b7576f 1270
1271These commands are useful within loops or in scripts.
1272
e5bd0d98 1273When an object is modified or erased, the whole view must be repainted. To avoid doing this too many times, Draw sets up a flag and delays the repaint to the end of the command in which the new prompt is issued. In a script, you may want to display the result of a change immediately. If the flag is raised, **repaint** will repaint the views and clear the flag.
1274
1275Graphic 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.
72b7576f 1276
bf62b306 1277See also: <a href="#occt_draw_4_1_11">pick</a> command.
72b7576f 1278
e5bd0d98 1279@subsection occt_draw_4_2 AIS viewer – view commands
72b7576f 1280
e5bd0d98 1281@subsubsection occt_draw_4_2_1 vinit
72b7576f 1282
e5bd0d98 1283Syntax:
1284~~~~~
1285vinit
1286~~~~~
72b7576f 1287Creates the 3D viewer window
1288
e5bd0d98 1289@subsubsection occt_draw_4_2_2 vhelp
72b7576f 1290
e5bd0d98 1291Syntax:
1292~~~~~
1293vhelp
1294~~~~~
72b7576f 1295Displays help in the 3D viewer window. The help consists in a list of hotkeys and their functionalities.
1296
e5bd0d98 1297@subsubsection occt_draw_4_2_3 vtop
72b7576f 1298
e5bd0d98 1299Syntax:
1300~~~~~
1301vtop
1302~~~~~
72b7576f 1303
1304Displays top view in the 3D viewer window.
e5bd0d98 1305
1306**Example:**
72b7576f 1307~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1308vinit
1309box b 10 10 10
1310vdisplay b
1311vfit
1312vtop
1313~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1314
e5bd0d98 1315@subsubsection occt_draw_4_2_4 vaxo
1316
1317Syntax:
1318~~~~~
1319vaxo
1320~~~~~
72b7576f 1321
1322Displays axonometric view in the 3D viewer window.
e5bd0d98 1323
1324**Example:**
72b7576f 1325~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
1326vinit
1327box b 10 10 10
1328vdisplay b
1329vfit
1330vaxo
1331~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72b7576f 1332
e5bd0d98 1333@subsubsection occt_draw_4_2_5 vsetbg
72b7576f 1334
e5bd0d98 1335Syntax:
1336~~~~~
1337vsetbg imagefile [filltype]
1338~~~~~
72b7576f 1339
e5bd0d98 1340Loads image file as background. *filltype* must be NONE, CENTERED, TILED or STRETCH.
1341
1342**Example:**
1343~~~~~
72b7576f 1344vinit
1345vsetbg myimage.brep CENTERED
e5bd0d98 1346~~~~~
72b7576f 1347
e5bd0d98 1348@subsubsection occt_draw_4_2_6 vclear
72b7576f 1349
e5bd0d98 1350Syntax:
1351~~~~~
1352vclear
1353~~~~~
72b7576f 1354Removes all objects from the viewer.
1355
e5bd0d98 1356@subsubsection occt_draw_4_2_7 vrepaint
72b7576f 1357
e5bd0d98 1358Syntax:
1359~~~~~
1360vrepaint
1361~~~~~
72b7576f 1362Forcedly redisplays the shape in the 3D viewer window.
1363
e5bd0d98 1364@subsubsection occt_draw_4_2_8 vfit
72b7576f 1365
e5bd0d98 1366Syntax:
1367~~~~~
1368vfit
1369~~~~~
72b7576f 1370Automatic zoom/panning. Objects in the view are visualized to occupy the maximum surface.
1371
e5bd0d98 1372@subsubsection occt_draw_4_2_9 vzfit
72b7576f 1373
e5bd0d98 1374Syntax:
1375~~~~~
1376vzfit
1377~~~~~
72b7576f 1378
1379Automatic depth panning. Objects in the view are visualized to occupy the maximum 3d space.
1380
e5bd0d98 1381@subsubsection occt_draw_4_2_10 vreadpixel
72b7576f 1382
e5bd0d98 1383Syntax:
1384~~~~~
1385vreadpixel xPixel yPixel [{rgb|rgba|depth|hls|rgbf|rgbaf}=rgba] [name]
1386~~~~~
1387Read pixel value for active view.
72b7576f 1388
72b7576f 1389
e5bd0d98 1390@subsubsection occt_draw_4_2_11 vselect
1391
1392Syntax:
1393~~~~~
1394vselect x1 y1 [x2 y2 [x3 y3 ... xn yn]] [shift_selection = 0|1]
1395~~~~~
1396
1397Emulates different types of selection:
1398
1399 * single mouse click selection
bf62b306 1400 * selection with a rectangle having the upper left and bottom right corners in <i>(x1,y1)</i> and <i>(x2,y2)</i> respectively
1401 * selection with a polygon having the corners in pixel positions <i>(x1,y1), (x2,y2),…, (xn,yn)</i>
e5bd0d98 1402 * any of these selections if shift_selection is set to 1.
1403
1404@subsubsection occt_draw_4_2_12 vmoveto
1405
1406Syntax:
1407
1408~~~~~
1409vmoveto x y
1410~~~~~
1411Emulates cursor movement to pixel position (x,y).
1412
1413@subsubsection occt_draw_4_2_13 vviewparams
1414
1415Syntax:
1416~~~~~
1417vviewparams [scale center_X center_Y proj_X proj_Y proj_Z up_X up_Y up_Z at_X at_Y at_Z]
1418~~~~~
1419Gets or sets the current view characteristics.
1420
1421@subsubsection occt_draw_4_2_14 vchangeselected
1422
1423Syntax:
1424~~~~~
1425vchangeselected shape
1426~~~~~
1427Adds a shape to selection or removes one from it.
1428
1429@subsubsection occt_draw_4_2_15 vzclipping
1430
1431Syntax:
1432~~~~~
1433vzclipping [mode] [depth width]
1434~~~~~
1435Gets or sets ZClipping mode, width and depth, where
1436 - *mode = OFF|BACK|FRONT|SLICE*
1437 - *depth* is a real value from segment [0,1]
1438 - *width* is a real value from segment [0,1]
1439
1440@subsubsection occt_draw_4_2_16 vnbselected
1441
1442Syntax:
1443~~~~~
1444vnbselected
1445~~~~~
1446Returns the number of selected objects in the interactive context.
1447
1448@subsubsection occt_draw_4_2_17 vantialiasing
1449
1450Syntax:
1451~~~~~
1452valntialiasing 1|0
1453~~~~~
1454Sets antialiasing if the command is called with 1 or unsets otherwise.
1455
1456@subsubsection occt_draw_4_2_18 vpurgedisplay
1457
1458Syntax:
1459~~~~~
1460vpurgedisplay [CollectorToo = 0|1]
1461~~~~~
1462Removes structures which do not belong to objects displayed in neutral point.
1463
1464@subsubsection occt_draw_4_2_19 vhlr
1465
1466Syntax:
1467~~~~~
1468vhlr is_enabled={on|off}
1469~~~~~
1470Switches hidden line removal (computed) mode on/off.
1471
1472@subsubsection occt_draw_4_2_20 vhlrtype
1473
1474Syntax:
1475~~~~~
1476vhlrtype algo_type={algo|polyalgo} [shape_1 ... shape_n]
1477~~~~~
1478
1479Changes the type of HLR algorithm used for shapes.
1480If the algo_type is algo, the exact HLR algorithm is used, otherwise the polygonal algorithm is used for defined shapes.
1481
bf62b306 1482If no shape is specified through the command arguments, the given HLR algorithm_type is applied to all *AIS_Shape* isntances in the current context, and the command also changes the default HLR algorithm type.
e5bd0d98 1483
1484**Note** that this command works with instances of *AIS_Shape* or derived classes only, other interactive object types are ignored.
1485
1486
1487@subsection occt_draw_4_3 AIS viewer – display commands
1488
1489@subsubsection occt_draw_4_3_1 vdisplay
1490
bf62b306 1491Syntax:
1492~~~~~
e5bd0d98 1493vdisplay name1 [name2] … [name n]
668c2575 1494~~~~~
bf62b306 1495
72b7576f 1496Displays named objects.
72b7576f 1497
668c2575 1498**Example:**
bf62b306 1499~~~~~
72b7576f 1500vinit
1501box b 40 40 40 10 10 10
1502psphere s 20
1503vdisplay s b
1504vfit
bf62b306 1505~~~~~
72b7576f 1506
668c2575 1507@subsubsection occt_draw_4_3_2 vdonly
72b7576f 1508
668c2575 1509Syntax:
1510~~~~~
bf62b306 1511vdonly [name1] … [name n]
1512~~~~~
1513
72b7576f 1514Displays only selected or named objects. If there are no selected or named objects, nothing is done.
72b7576f 1515
668c2575 1516**Example:**
bf62b306 1517~~~~~
72b7576f 1518vinit
1519box b 40 40 40 10 10 10
1520psphere s 20
1521vdonly b
bf62b306 1522vfit
1523~~~~~
1524
668c2575 1525@subsubsection occt_draw_4_3_3 vdisplayall
72b7576f 1526
668c2575 1527Syntax:
bf62b306 1528~~~~~
668c2575 1529vdisplayall
bf62b306 1530~~~~~
72b7576f 1531
bf62b306 1532Displays all created objects.
668c2575 1533
1534**Example:**
bf62b306 1535~~~~~
72b7576f 1536vinit
1537box b 40 40 40 10 10 10
1538psphere s 20
1539vdisplayall
1540vfit
bf62b306 1541~~~~~
72b7576f 1542
668c2575 1543@subsubsection occt_draw_4_3_4 verase
1544
bf62b306 1545Syntax:
668c2575 1546~~~~~
bf62b306 1547verase [name1] [name2] … [name n]
1548~~~~~
72b7576f 1549
1550Erases some selected or named objects. If there are no selected or named objects, the whole viewer is erased.
72b7576f 1551
668c2575 1552**Example:**
1553~~~~~
72b7576f 1554vinit
1555box b1 40 40 40 10 10 10
1556box b2 -40 -40 -40 10 10 10
1557psphere s 20
1558vdisplayall
1559vfit
bf62b306 1560# erase only first box
72b7576f 1561verase b1
bf62b306 1562# erase second box and sphere
1563verase
1564~~~~~
72b7576f 1565
668c2575 1566@subsubsection occt_draw_4_3_5 veraseall
72b7576f 1567
668c2575 1568Syntax:
1569~~~~~
bf62b306 1570veraseall
1571~~~~~
668c2575 1572
bf62b306 1573Erases all objects displayed in the viewer.
668c2575 1574
bf62b306 1575**Example:**
1576~~~~~
72b7576f 1577vinit
1578box b1 40 40 40 10 10 10
1579box b2 -40 -40 -40 10 10 10
1580psphere s 20
1581vdisplayall
1582vfit
bf62b306 1583# erase only first box
72b7576f 1584verase b1
bf62b306 1585# erase second box and sphere
1586verseall
1587~~~~~
72b7576f 1588
668c2575 1589@subsubsection occt_draw_4_3_6 vsetdispmode
1590
1591Syntax:
668c2575 1592~~~~~
bf62b306 1593vsetdispmode [name] mode(0,1,2,3)
1594~~~~~
72b7576f 1595
bf62b306 1596Sets display mode for all, selected or named objects.
1597* *0* (*WireFrame*),
1598* *1* (*Shading*),
1599* *2* (*Quick HideLineremoval*),
1600* *3* (*Exact HideLineremoval*).
72b7576f 1601
e5bd0d98 1602**Example:**
668c2575 1603~~~~~
72b7576f 1604vinit
1605box b 10 10 10
1606vdisplay b
1607vsetdispmode 1
bf62b306 1608vfit
668c2575 1609~~~~~
bf62b306 1610
668c2575 1611@subsubsection occt_draw_4_3_7 vdisplaytype
1612
1613Syntax:
1614~~~~~
bf62b306 1615vdisplaytype type
1616~~~~~
668c2575 1617
bf62b306 1618Displays all objects of a given type.
1619The following types are possible: *Point*, *Axis*, *Trihedron*, *PlaneTrihedron*, *Line*, *Circle*, *Plane*, *Shape*, *ConnectedShape*, *MultiConn.Shape*, *ConnectedInter.*, *MultiConn.*, *Constraint* and *Dimension*.
668c2575 1620
1621@subsubsection occt_draw_4_3_8 verasetype
72b7576f 1622
bf62b306 1623Syntax:
1624~~~~~
1625verasetype type
1626~~~~~
72b7576f 1627
1628Erases all objects of a given type.
bf62b306 1629Possible type is *Point*, *Axis*, *Trihedron*, *PlaneTrihedron*, *Line*, *Circle*, *Plane*, *Shape*, *ConnectedShape*, *MultiConn.Shape*, *ConnectedInter.*, *MultiConn.*, *Constraint* and *Dimension*.
72b7576f 1630
bf62b306 1631@subsubsection occt_draw_4_3_9 vtypes
72b7576f 1632
bf62b306 1633Syntax:
1634~~~~~
1635vtypes
1636~~~~~
72b7576f 1637
bf62b306 1638Makes a list of known types and signatures in AIS.
72b7576f 1639
bf62b306 1640@subsubsection occt_draw_4_3_10 vsetcolor
72b7576f 1641
bf62b306 1642Syntax:
1643~~~~~
1644vsetcolor [shapename] colorname
1645~~~~~
72b7576f 1646
bf62b306 1647Sets color for all, selected or named shapes.
1648Possible *colorname* is: *BLACK*, *MATRAGRAY*, *MATRABLUE*, *ALICEBLUE*, *ANTIQUEWHITE*, *ANTIQUEWHITE1*, *ANTIQUEWHITE2*, *ANTIQUEWHITE3*, *ANTIQUEWHITE4*, *AQUAMARINE1*, *AQUAMARINE2*, *AQUAMARINE4*, *AZURE*, *AZURE2*, *AZURE3*, *AZURE4*, *BEIGE*, *BISQUE*, *BISQUE2*, *BISQUE3*, *BISQUE4*, *BLANCHEDALMOND*, *BLUE1*, *BLUE2*, *BLUE3*, *BLUE4*, *BLUEVIOLET*, *BROWN*, *BROWN1*, *BROWN2*, *BROWN3*, *BROWN4*, *BURLYWOOD*, *BURLYWOOD1*, *BURLYWOOD2*, *BURLYWOOD3*, *BURLYWOOD4*, *CADETBLUE*, *CADETBLUE1*, *CADETBLUE2*, *CADETBLUE3*, *CADETBLUE4*, *CHARTREUSE*, *CHARTREUSE1*, *CHARTREUSE2*, *CHARTREUSE3*, *CHARTREUSE4*, *CHOCOLATE*, *CHOCOLATE1*, *CHOCOLATE2*, *CHOCOLATE3*, *CHOCOLATE4*, *CORAL*, *CORAL1*, *CORAL2*, *CORAL3*, *CORAL4*, *CORNFLOWERBLUE*, *CORNSILK1*, *CORNSILK2*, *CORNSILK3*, *CORNSILK4*, *CYAN1*, *CYAN2*, *CYAN3*, *CYAN4*, *DARKGOLDENROD*, *DARKGOLDENROD1*, *DARKGOLDENROD2*, *DARKGOLDENROD3*, *DARKGOLDENROD4*, *DARKGREEN*, *DARKKHAKI*, *DARKOLIVEGREEN*, *DARKOLIVEGREEN1*, *DARKOLIVEGREEN2*, *DARKOLIVEGREEN3*, *DARKOLIVEGREEN4*, *DARKORANGE*, *DARKORANGE1*, *DARKORANGE2*, *DARKORANGE3*, *DARKORANGE4*, *DARKORCHID*, *DARKORCHID1*, *DARKORCHID2*, *DARKORCHID3*, *DARKORCHID4*, *DARKSALMON*, *DARKSEAGREEN*, *DARKSEAGREEN1*, *DARKSEAGREEN2*, *DARKSEAGREEN3*, *DARKSEAGREEN4*, *DARKSLATEBLUE*, *DARKSLATEGRAY1*, *DARKSLATEGRAY2*, *DARKSLATEGRAY3*, *DARKSLATEGRAY4*, *DARKSLATEGRAY*, *DARKTURQUOISE*, *DARKVIOLET*, *DEEPPINK*, *DEEPPINK2*, *DEEPPINK3*, *DEEPPINK4*, *DEEPSKYBLUE1*, *DEEPSKYBLUE2*, *DEEPSKYBLUE3*, *DEEPSKYBLUE4*, *DODGERBLUE1*, *DODGERBLUE2*, *DODGERBLUE3*, *DODGERBLUE4*, *FIREBRICK*, *FIREBRICK1*, *FIREBRICK2*, *FIREBRICK3*, *FIREBRICK4*, *FLORALWHITE*, *FORESTGREEN*, *GAINSBORO*, *GHOSTWHITE*, *GOLD*, *GOLD1*, *GOLD2*, *GOLD3*, *GOLD4*, *GOLDENROD*, *GOLDENROD1*, *GOLDENROD2*, *GOLDENROD3*, *GOLDENROD4*, *GRAY*, *GRAY0*, *GRAY1*, *GRAY10*, *GRAY11*, *GRAY12*, *GRAY13*, *GRAY14*, *GRAY15*, *GRAY16*, *GRAY17*, *GRAY18*, *GRAY19*, *GRAY2*, *GRAY20*, *GRAY21*, *GRAY22*, *GRAY23*, *GRAY24*, *GRAY25*, *GRAY26*, *GRAY27*, *GRAY28*, *GRAY29*, *GRAY3*, *GRAY30*, *GRAY31*, *GRAY32*, *GRAY33*, *GRAY34*, *GRAY35*, *GRAY36*, *GRAY37*, *GRAY38*, *GRAY39*, *GRAY4*, *GRAY40*, *GRAY41*, *GRAY42*, *GRAY43*, *GRAY44*, *GRAY45*, *GRAY46*, *GRAY47*, *GRAY48*, *GRAY49*, *GRAY5*, *GRAY50*, *GRAY51*, *GRAY52*, *GRAY53*, *GRAY54*, *GRAY55*, *GRAY56*, *GRAY57*, *GRAY58*, *GRAY59*, *GRAY6*, *GRAY60*, *GRAY61*, *GRAY62*, *GRAY63*, *GRAY64*, *GRAY65*, *GRAY66*, *GRAY67*, *GRAY68*, *GRAY69*, *GRAY7*, *GRAY70*, *GRAY71*, *GRAY72*, *GRAY73*, *GRAY74*, *GRAY75*, *GRAY76*, *GRAY77*, *GRAY78*, *GRAY79*, *GRAY8*, *GRAY80*, *GRAY81*, *GRAY82*, *GRAY83*, *GRAY85*, *GRAY86*, *GRAY87*, *GRAY88*, *GRAY89*, *GRAY9*, *GRAY90*, *GRAY91*, *GRAY92*, *GRAY93*, *GRAY94*, *GRAY95*, *GREEN*, *GREEN1*, *GREEN2*, *GREEN3*, *GREEN4*, *GREENYELLOW*, *GRAY97*, *GRAY98*, *GRAY99*, *HONEYDEW*, *HONEYDEW2*, *HONEYDEW3*, *HONEYDEW4*, *HOTPINK*, *HOTPINK1*, *HOTPINK2*, *HOTPINK3*, *HOTPINK4*, *INDIANRED*, *INDIANRED1*, *INDIANRED2*, *INDIANRED3*, *INDIANRED4*, *IVORY*, *IVORY2*, *IVORY3*, *IVORY4*, *KHAKI*, *KHAKI1*, *KHAKI2*, *KHAKI3*, *KHAKI4*, *LAVENDER*, *LAVENDERBLUSH1*, *LAVENDERBLUSH2*, *LAVENDERBLUSH3*, *LAVENDERBLUSH4*, *LAWNGREEN*, *LEMONCHIFFON1*, *LEMONCHIFFON2*, *LEMONCHIFFON3*, *LEMONCHIFFON4*, *LIGHTBLUE*, *LIGHTBLUE1*, *LIGHTBLUE2*, *LIGHTBLUE3*, *LIGHTBLUE4*, *LIGHTCORAL*, *LIGHTCYAN1*, *LIGHTCYAN2*, *LIGHTCYAN3*, *LIGHTCYAN4*, *LIGHTGOLDENROD*, *LIGHTGOLDENROD1*, *LIGHTGOLDENROD2*, *LIGHTGOLDENROD3*, *LIGHTGOLDENROD4*, *LIGHTGOLDENRODYELLOW*, *LIGHTGRAY*, *LIGHTPINK*, *LIGHTPINK1*, *LIGHTPINK2*, *LIGHTPINK3*, *LIGHTPINK4*, *LIGHTSALMON1*, *LIGHTSALMON2*, *LIGHTSALMON3*, *LIGHTSALMON4*, *LIGHTSEAGREEN*, *LIGHTSKYBLUE*, *LIGHTSKYBLUE1*, *LIGHTSKYBLUE2*, *LIGHTSKYBLUE3*, *LIGHTSKYBLUE4*, *LIGHTSLATEBLUE*, *LIGHTSLATEGRAY*, *LIGHTSTEELBLUE*, *LIGHTSTEELBLUE1*, *LIGHTSTEELBLUE2*, *LIGHTSTEELBLUE3*, *LIGHTSTEELBLUE4*, *LIGHTYELLOW*, *LIGHTYELLOW2*, *LIGHTYELLOW3*, *LIGHTYELLOW4*, *LIMEGREEN*, *LINEN*, *MAGENTA1*, *MAGENTA2*, *MAGENTA3*, *MAGENTA4*, *MAROON*, *MAROON1*, *MAROON2*, *MAROON3*, *MAROON4*, *MEDIUMAQUAMARINE*, *MEDIUMORCHID*, *MEDIUMORCHID1*, *MEDIUMORCHID2*, *MEDIUMORCHID3*, *MEDIUMORCHID4*, *MEDIUMPURPLE*, *MEDIUMPURPLE1*, *MEDIUMPURPLE2*, *MEDIUMPURPLE3*, *MEDIUMPURPLE4*, *MEDIUMSEAGREEN*, *MEDIUMSLATEBLUE*, *MEDIUMSPRINGGREEN*, *MEDIUMTURQUOISE*, *MEDIUMVIOLETRED*, *MIDNIGHTBLUE*, *MINTCREAM*, *MISTYROSE*, *MISTYROSE2*, *MISTYROSE3*, *MISTYROSE4*, *MOCCASIN*, *NAVAJOWHITE1*, *NAVAJOWHITE2*, *NAVAJOWHITE3*, *NAVAJOWHITE4*, *NAVYBLUE*, *OLDLACE*, *OLIVEDRAB*, *OLIVEDRAB1*, *OLIVEDRAB2*, *OLIVEDRAB3*, *OLIVEDRAB4*, *ORANGE*, *ORANGE1*, *ORANGE2*, *ORANGE3*, *ORANGE4*, *ORANGERED*, *ORANGERED1*, *ORANGERED2*, *ORANGERED3*, *ORANGERED4*, *ORCHID*, *ORCHID1*, *ORCHID2*, *ORCHID3*, *ORCHID4*, *PALEGOLDENROD*, *PALEGREEN*, *PALEGREEN1*, *PALEGREEN2*, *PALEGREEN3*, *PALEGREEN4*, *PALETURQUOISE*, *PALETURQUOISE1*, *PALETURQUOISE2*, *PALETURQUOISE3*, *PALETURQUOISE4*, *PALEVIOLETRED*, *PALEVIOLETRED1*, *PALEVIOLETRED2*, *PALEVIOLETRED3*, *PALEVIOLETRED4*, *PAPAYAWHIP*, *PEACHPUFF*, *PEACHPUFF2*, *PEACHPUFF3*, *PEACHPUFF4*, *PERU*, *PINK*, *PINK1*, *PINK2*, *PINK3*, *PINK4*, *PLUM*, *PLUM1*, *PLUM2*, *PLUM3*, *PLUM4*, *POWDERBLUE*, *PURPLE*, *PURPLE1*, *PURPLE2*, *PURPLE3*, *PURPLE4*, *RED*, *RED1*, *RED2*, *RED3*, *RED4*, *ROSYBROWN*, *ROSYBROWN1*, *ROSYBROWN2*, *ROSYBROWN3*, *ROSYBROWN4*, *ROYALBLUE*, *ROYALBLUE1*, *ROYALBLUE2*, *ROYALBLUE3*, *ROYALBLUE4*, *SADDLEBROWN*, *SALMON*, *SALMON1*, *SALMON2*, *SALMON3*, *SALMON4*, *SANDYBROWN*, *SEAGREEN*, *SEAGREEN1*, *SEAGREEN2*, *SEAGREEN3*, *SEAGREEN4*, *SEASHELL*, *SEASHELL2*, *SEASHELL3*, *SEASHELL4*, *BEET*, *TEAL*, *SIENNA*, *SIENNA1*, *SIENNA2*, *SIENNA3*, *SIENNA4*, *SKYBLUE*, *SKYBLUE1*, *SKYBLUE2*, *SKYBLUE3*, *SKYBLUE4*, *SLATEBLUE*, *SLATEBLUE1*, *SLATEBLUE2*, *SLATEBLUE3*, *SLATEBLUE4*, *SLATEGRAY1*, *SLATEGRAY2*, *SLATEGRAY3*, *SLATEGRAY4*, *SLATEGRAY*, *SNOW*, *SNOW2*, *SNOW3*, *SNOW4*, *SPRINGGREEN*, *SPRINGGREEN2*, *SPRINGGREEN3*, *SPRINGGREEN4*, *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*.
72b7576f 1649
bf62b306 1650@subsubsection occt_draw_4_3_11 vunsetcolor
72b7576f 1651
bf62b306 1652Syntax:
1653~~~~~
1654vunsetcolor [shapename]
1655~~~~~
72b7576f 1656
1657Sets default color for all, selected or named shapes.
1658
bf62b306 1659@subsubsection occt_draw_4_3_12 vsettransparency
1660
1661Syntax:
1662~~~~~
1663vsettransparency [shapename] coeficient
1664~~~~~
72b7576f 1665
bf62b306 1666Sets transparency for all selected or named shapes. The *coefficient* may be between 0.0 (opaque) and 1.0 (fully transparent).
72b7576f 1667
bf62b306 1668**Warning**: at 1.0 the shape becomes invisible.
1669
e5bd0d98 1670**Example:**
bf62b306 1671~~~~~
72b7576f 1672vinit
1673box b 10 10 10
1674psphere s 20
1675vdisplay b s
1676vfit
1677vsetdispmode 1
bf62b306 1678vsettransparency b 0.5
1679~~~~~
72b7576f 1680
bf62b306 1681@subsubsection occt_draw_4_3_13 vunsettransparency
72b7576f 1682
bf62b306 1683Syntax:
1684~~~~~
1685vunsettransparency [shapename]
1686~~~~~
72b7576f 1687
1688Sets default transparency (0.0) for all selected or named shapes.
1689
bf62b306 1690@subsubsection occt_draw_4_3_14 vsetmaterial
72b7576f 1691
bf62b306 1692Syntax:
1693~~~~~
1694vsetmaterial [shapename] materialname
1695~~~~~
72b7576f 1696
1697Sets material for all selected or named shapes.
72b7576f 1698
bf62b306 1699**materialname** can be *BRASS*, *BRONZE*, *COPPER*, *GOLD*, *PEWTER*, *PLASTER*, *PLASTIC*, *SILVER*, *STEEL*, *STONE*, *SHINY_PLASTIC*, *SATIN*, *METALIZED*, *NEON_GNC*, *CHROME*, *ALUMINIUM*, *OBSIDIAN*, *NEON_PHC* or *JADE*.
1700
1701**Example:**
1702~~~~~
72b7576f 1703vinit
1704psphere s 20
1705vdisplay s
1706vfit
1707vsetdispmode 1
1708vsetmaterial s JADE
bf62b306 1709~~~~~
72b7576f 1710
bf62b306 1711@subsubsection occt_draw_4_3_15 vunsetmaterial
72b7576f 1712
bf62b306 1713Syntax:
1714~~~~~
1715vunsetmaterial [shapename]
1716~~~~~
72b7576f 1717
1718Sets default material for all selected or named shapes.
1719
bf62b306 1720@subsubsection occt_draw_4_3_16 vsetwidth
72b7576f 1721
bf62b306 1722Syntax:
1723~~~~~
1724vsetwidth [shapename] coeficient
1725~~~~~
72b7576f 1726
1727Sets width of the edges for all selected or named shapes.
bf62b306 1728The *coefficient* may be between 0.0 and 10.0.
1729
e5bd0d98 1730**Example:**
bf62b306 1731~~~~~
72b7576f 1732vinit
1733box b 10 10 10
1734vdisplay b
1735vfit
bf62b306 1736vsetwidth b 5
1737~~~~~
72b7576f 1738
bf62b306 1739@subsubsection occt_draw_4_3_17 vunsetwidth
72b7576f 1740
bf62b306 1741Syntax:
1742~~~~~
1743vunsetwidth [shapename]
1744~~~~~
72b7576f 1745
1746Sets default width of edges (0.0) for all selected or named shapes.
1747
bf62b306 1748@subsubsection occt_draw_4_3_18 vsetshading
72b7576f 1749
bf62b306 1750Syntax:
1751~~~~~
1752vsetshading shapename [coefficient]
1753~~~~~
72b7576f 1754
1755Sets deflection coefficient that defines the quality of the shape’s representation in the shading mode. Default coefficient is 0.0008.
72b7576f 1756
bf62b306 1757**Example:**
1758~~~~~
72b7576f 1759vinit
1760psphere s 20
1761vdisplay s
1762vfit
1763vsetdispmode 1
bf62b306 1764vsetshading s 0.005
1765~~~~~
1766
1767@subsubsection occt_draw_4_3_19 vunsetshading
72b7576f 1768
bf62b306 1769Syntax:
1770~~~~~
1771vunsetshading [shapename]
1772~~~~~
72b7576f 1773
1774Sets default deflection coefficient (0.0008) that defines the quality of the shape’s representation in the shading mode. Default coefficient is 0.0008.
1775
bf62b306 1776@subsubsection occt_draw_4_3_20 vsetam
72b7576f 1777
bf62b306 1778Syntax:
1779~~~~~
1780vsetam [shapename] mode
1781~~~~~
1782
1783Activates selection mode for all selected or named shapes:
1784* *0* for *shape* itself,
1785* *1* (*vertices*),
1786* *2* (*edges*),
1787* *3* (*wires*),
1788* *4* (*faces*),
1789* *5* (*shells*),
1790* *6* (*solids*),
1791* *7* (*compounds*).
1792
e5bd0d98 1793**Example:**
bf62b306 1794~~~~~
72b7576f 1795vinit
1796box b 10 10 10
1797vdisplay b
1798vfit
bf62b306 1799vsetam b 2
1800~~~~~
1801
1802@subsubsection occt_draw_4_3_21 vunsetam
72b7576f 1803
bf62b306 1804Syntax:
1805~~~~~
1806vunsetam
1807~~~~~
72b7576f 1808
1809Deactivates all selection modes for all shapes.
1810
bf62b306 1811@subsubsection occt_draw_4_3_22 vdump
72b7576f 1812
bf62b306 1813Syntax:
1814~~~~~
1815vdump <filename>.{png|xwd|bmp}
1816~~~~~
72b7576f 1817
1818Extracts the contents of the viewer window to a png, XWD or BMP file.
1819
bf62b306 1820@subsubsection occt_draw_4_3_23 vdir
72b7576f 1821
bf62b306 1822Syntax:
1823~~~~~
1824vdir
1825~~~~~
72b7576f 1826
1827Displays the list of displayed objects.
1828
bf62b306 1829@subsubsection occt_draw_4_3_24 vsub
72b7576f 1830
bf62b306 1831Syntax:
1832~~~~~
1833vsub 0/1(on/off)[shapename]
1834~~~~~
72b7576f 1835
bf62b306 1836Hilights/unhilights named or selected objects which are displayed at neutral state with subintensity color.
1837
e5bd0d98 1838**Example:**
bf62b306 1839~~~~~
72b7576f 1840vinit
1841box b 10 10 10
1842psphere s 20
1843vdisplay b s
1844vfit
1845vsetdispmode 1
bf62b306 1846vsub b 1
1847~~~~~
72b7576f 1848
bf62b306 1849@subsubsection occt_draw_4_3_25 vardis
72b7576f 1850
bf62b306 1851Syntax:
1852~~~~~
1853vardis
1854~~~~~
72b7576f 1855
1856Displays active areas (for each activated sensitive entity, one or several 2D bounding boxes are displayed, depending on the implementation of a particular entity).
1857
bf62b306 1858@subsubsection occt_draw_4_3_26 varera
72b7576f 1859
bf62b306 1860Syntax:
1861~~~~~
1862varera
1863~~~~~
72b7576f 1864
1865Erases active areas.
1866
bf62b306 1867@subsubsection occt_draw_4_3_27 vsensdis
72b7576f 1868
bf62b306 1869Syntax:
1870~~~~~
1871vsensdis
1872~~~~~
72b7576f 1873
1874Displays active entities (sensitive entities of one of the standard types corresponding to active selection modes).
1875
1876Standard entity types are those defined in Select3D package:
1877 * sensitive box
1878 * sensitive face
1879 * sensitive curve
1880 * sensitive segment
1881 * sensitive circle
1882 * sensitive point
1883 * sensitive triangulation
1884 * sensitive triangle
1885Custom (application-defined) sensitive entity types are not processed by this command.
1886
bf62b306 1887@subsubsection occt_draw_4_3_28 vsensera
72b7576f 1888
bf62b306 1889Syntax:
1890~~~~~
1891vsensera
1892~~~~~
72b7576f 1893
1894Erases active entities.
1895
bf62b306 1896@subsubsection occt_draw_4_3_29 vperf
72b7576f 1897
bf62b306 1898Syntax:
1899~~~~~
1900vperf shapename 1/0 (Transformation/Loacation) 1/0 (Primitives sensibles ON/OFF)
1901~~~~~
72b7576f 1902
1903Tests the animation of an object along a predefined trajectory.
72b7576f 1904
bf62b306 1905**Example:**
1906~~~~~
72b7576f 1907vinit
1908box b 10 10 10
1909psphere s 20
1910vdisplay b s
1911vfit
1912vsetdispmode 0
bf62b306 1913vperf b 1 1
1914~~~~~
1915
1916@subsubsection occt_draw_4_3_30 vr
72b7576f 1917
bf62b306 1918Syntax:
1919~~~~~
1920vr filename
1921~~~~~
72b7576f 1922
1923Reads shape from BREP-format file and displays it in the viewer.
72b7576f 1924
bf62b306 1925**Example:**
1926~~~~~
72b7576f 1927vinit
bf62b306 1928vr myshape.brep
1929~~~~~
1930
1931@subsubsection occt_draw_4_3_31 vstate
72b7576f 1932
bf62b306 1933Syntax:
1934~~~~~
1935vstate [name1] … [name n]
1936~~~~~
72b7576f 1937
1938Makes a list of the status (**Displayed** or **Not Displayed**) of some selected or named objects.
1939
1940
bf62b306 1941@subsection occt_draw_4_4 AIS viewer – object commands
72b7576f 1942
bf62b306 1943@subsubsection occt_draw_4_4_1 vtrihedron
72b7576f 1944
bf62b306 1945Syntax:
1946~~~~~
1947vtrihedron name [X0] [Y0] [Z0] [Zu] [Zv] [Zw] [Xu] [Xv] [Xw]
1948~~~~~
72b7576f 1949
bf62b306 1950Creates a new *AIS_Trihedron* object. If no argument is set, the default trihedron (0XYZ) is created.
1951
e5bd0d98 1952**Example:**
bf62b306 1953~~~~~
72b7576f 1954vinit
bf62b306 1955vtrihedron tr
1956~~~~~
72b7576f 1957
bf62b306 1958@subsubsection occt_draw_4_4_2 vplanetri
72b7576f 1959
bf62b306 1960Syntax:
1961~~~~~
1962vplanetri name
1963~~~~~
72b7576f 1964
1965Creates a plane from a trihedron selection.
1966
1967
bf62b306 1968@subsubsection occt_draw_4_4_3 vsize
72b7576f 1969
bf62b306 1970Syntax:
1971~~~~~
1972vsize [name] [size]
1973~~~~~
72b7576f 1974
bf62b306 1975Changes the size of a named or selected trihedron. If the name is not defined: it affects the selected trihedrons otherwise nothing is done. If the value is not defined, it is set to 100 by default.
1976
e5bd0d98 1977**Example:**
bf62b306 1978~~~~~
72b7576f 1979vinit
1980vtrihedron tr1
1981vtrihedron tr2 0 0 0 1 0 0 1 0 0
bf62b306 1982vsize tr2 400
1983~~~~~
72b7576f 1984
bf62b306 1985@subsubsection occt_draw_4_4_4 vaxis
72b7576f 1986
bf62b306 1987Syntax:
1988~~~~~
1989vaxis name [Xa Ya Za Xb Yb Zb]
1990~~~~~
72b7576f 1991
bf62b306 1992Creates an axis. If the values are not defined, an axis is created by interactive selection of two vertices or one edge
1993
e5bd0d98 1994**Example:**
bf62b306 1995~~~~~
72b7576f 1996vinit
1997vtrihedron tr
1998vaxis axe1 0 0 0 1 0 0
bf62b306 1999~~~~~
72b7576f 2000
bf62b306 2001@subsubsection occt_draw_4_4_5 vaxispara
72b7576f 2002
bf62b306 2003Syntax:
2004~~~~~
2005vaxispara nom
2006~~~~~
72b7576f 2007
2008Creates an axis by interactive selection of an edge and a vertex.
2009
bf62b306 2010@subsubsection occt_draw_4_4_6 vaxisortho
72b7576f 2011
bf62b306 2012Syntax:
2013~~~~~
2014vaxisotrho name
2015~~~~~
72b7576f 2016
2017Creates an axis by interactive selection of an edge and a vertex. The axis will be orthogonal to the selected edge.
2018
bf62b306 2019@subsubsection occt_draw_4_4_7 vpoint
72b7576f 2020
bf62b306 2021Syntax:
2022~~~~~
2023vpoint name [Xa Ya Za]
2024~~~~~
72b7576f 2025
2026Creates a point from coordinates. If the values are not defined, a point is created by interactive selection of a vertice or an edge (in the center of the edge).
72b7576f 2027
bf62b306 2028**Example:**
2029~~~~~
72b7576f 2030vinit
2031vpoint p 0 0 0
bf62b306 2032~~~~~
72b7576f 2033
bf62b306 2034@subsubsection occt_draw_4_4_8 vplane
72b7576f 2035
bf62b306 2036Syntax:
2037~~~~~
2038vplane name [AxisName] [PointName]
2039vplane name [PointName] [PointName] [PointName]
2040vplane name [PlaneName] [PointName]
2041~~~~~
72b7576f 2042
bf62b306 2043Creates a plane from named or interactively selected entities.
2044
e5bd0d98 2045**Example:**
bf62b306 2046~~~~~
72b7576f 2047vinit
2048vpoint p1 0 50 0
2049vaxis axe1 0 0 0 0 0 1
2050vtrihedron tr
2051vplane plane1 axe1 p1
bf62b306 2052~~~~~
72b7576f 2053
bf62b306 2054@subsubsection occt_draw_4_4_9 vplanepara
72b7576f 2055
bf62b306 2056Syntax:
2057~~~~~
2058vplanepara name
2059~~~~~
72b7576f 2060
2061Creates a plane from interactively selected vertex and face.
2062
bf62b306 2063@subsubsection occt_draw_4_4_10 vplaneortho
72b7576f 2064
bf62b306 2065Syntax:
2066~~~~~
2067vplaneortho name
2068~~~~~
72b7576f 2069
2070Creates a plane from interactive selected face and coplanar edge.
2071
bf62b306 2072@subsubsection occt_draw_4_4_11 vline
72b7576f 2073
bf62b306 2074Syntax:
2075~~~~~
2076vline name [PointName] [PointName]
2077vline name [Xa Ya Za Xb Yb Zb]
2078~~~~~
72b7576f 2079
2080Creates a line from coordinates, named or interactively selected vertices.
72b7576f 2081
bf62b306 2082**Example:**
2083~~~~~
72b7576f 2084vinit
2085vtrihedron tr
2086vpoint p1 0 50 0
2087vpoint p2 50 0 0
2088vline line1 p1 p2
2089vline line2 0 0 0 50 0 1
bf62b306 2090~~~~~
72b7576f 2091
bf62b306 2092@subsubsection occt_draw_4_4_12 vcircle
72b7576f 2093
bf62b306 2094Syntax:
2095~~~~~
2096vcircle name [PointName PointName PointName IsFilled]
72b7576f 2097vcircle name [PlaneName PointName Radius IsFilled]
bf62b306 2098~~~~~
72b7576f 2099
bf62b306 2100Creates a circle from named or interactively selected entities. Parameter IsFilled is defined as 0 or 1.
2101
e5bd0d98 2102**Example:**
bf62b306 2103~~~~~
72b7576f 2104vinit
2105vtrihedron tr
2106vpoint p1 0 50 0
2107vpoint p2 50 0 0
2108vpoint p3 0 0 0
bf62b306 2109vcircle circle1 p1 p2 p3 1
2110~~~~~
72b7576f 2111
bf62b306 2112@subsubsection occt_draw_4_4_13 vtri2d
72b7576f 2113
bf62b306 2114Syntax:
2115~~~~~
2116vtri2d name
2117~~~~~
72b7576f 2118
2119Creates a plane with a 2D trihedron from an interactively selected face.
2120
bf62b306 2121@subsubsection occt_draw_4_4_14 vselmode
72b7576f 2122
bf62b306 2123Syntax:
2124~~~~~
2125vselmode [object] mode On/Off
2126~~~~~
72b7576f 2127
2128Sets the selection mode for an object. If the object value is not defined, the selection mode is set for all displayed objects.
bf62b306 2129Value *On* is defined as 1 and *Off* – as 0.
72b7576f 2130
bf62b306 2131**Example:**
2132~~~~~
72b7576f 2133vinit
2134vpoint p1 0 0 0
2135vpoint p2 50 0 0
2136vpoint p3 25 40 0
2137vtriangle triangle1 p1 p2 p3
bf62b306 2138~~~~~
2139
2140@subsubsection occt_draw_4_4_15 vconnect, vconnectsh
72b7576f 2141
bf62b306 2142Syntax:
2143~~~~~
2144vconnect name object Xo Yo Zo Xu Xv Xw Zu Zv Zw
2145vconnectsh name shape Xo Yo Zo Xu Xv Xw Zu Zv Zw
2146~~~~~
72b7576f 2147
2148Creates and displays an object with input location connected to a named entity.
bf62b306 2149The difference between these two commands is that the object created by *vconnect* does not support the selection modes different from 0.
72b7576f 2150
bf62b306 2151**Example:**
2152~~~~~
72b7576f 2153Vinitvinit
2154vpoint p1 0 0 0
2155vpoint p2 50 0 0
2156vsegment segment p1 p2
2157restore CrankArm.brep obj
2158vdisplay obj
bf62b306 2159vconnectsh new obj 100100100 1 0 0 0 0 1
2160~~~~~
72b7576f 2161
bf62b306 2162@subsubsection occt_draw_4_4_16 vtriangle
72b7576f 2163
bf62b306 2164Syntax:
2165~~~~~
2166vtriangle name PointName PointName PointName
2167~~~~~
72b7576f 2168
2169Creates and displays a filled triangle from named points.
72b7576f 2170
bf62b306 2171**Example:**
2172~~~~~
72b7576f 2173vinit
2174vpoint p1 0 0 0
2175vpoint p2 50 0 0
2176vpoint p3 25 40 0
bf62b306 2177vtriangle triangle1 p1 p2 p3
2178~~~~~
72b7576f 2179
bf62b306 2180@subsubsection occt_draw_4_4_17 vsegment
72b7576f 2181
bf62b306 2182Syntax:
2183~~~~~
2184vsegment name PointName PointName
2185~~~~~
72b7576f 2186
2187Creates and displays a segment from named points.
72b7576f 2188
bf62b306 2189**Example:**
2190~~~~~
72b7576f 2191Vinit
2192vpoint p1 0 0 0
2193vpoint p2 50 0 0
2194vsegment segment p1 p2
bf62b306 2195~~~~~
72b7576f 2196
bf62b306 2197@subsection occt_draw_4_5 AIS viewer – Mesh Visualization Service
72b7576f 2198
bf62b306 2199**MeshVS** (Mesh Visualization Service) component provides flexible means of displaying meshes with associated pre- and post- processor data.
72b7576f 2200
bf62b306 2201@subsubsection occt_draw_4_5_1 meshfromstl
72b7576f 2202
bf62b306 2203Syntax:
2204~~~~~
2205meshfromstl meshname file
2206~~~~~
2207
2208Creates a *MeshVS_Mesh* object based on STL file data. The object will be displayed immediately.
2209
2210**Example:**
2211~~~~~
2212meshfromstl mesh myfile.stl
2213~~~~~
72b7576f 2214
bf62b306 2215@subsubsection occt_draw_4_5_2 meshdispmode
72b7576f 2216
bf62b306 2217Syntax:
2218~~~~~
2219meshdispmode meshname displaymode
2220~~~~~
72b7576f 2221
bf62b306 2222Changes the display mode of object **meshname**. The **displaymode** is integer, which can be:
2223* *1* for *wireframe*,
2224* *2* for *shading* mode, or
2225* *3* for *shrink* mode.
72b7576f 2226
e5bd0d98 2227**Example:**
bf62b306 2228~~~~~
2229vinit
72b7576f 2230meshfromstl mesh myfile.stl
bf62b306 2231meshdispmode mesh 2
2232~~~~~
72b7576f 2233
bf62b306 2234@subsubsection occt_draw_4_5_3 meshselmode
72b7576f 2235
bf62b306 2236Syntax:
2237~~~~~
2238meshselmode meshname selectionmode
2239~~~~~
72b7576f 2240
bf62b306 2241Changes the selection mode of object **meshname**. The *selectionmode* is integer OR-combination of mode flags. The basic flags are the following:
2242* *1* – node selection;
2243* *2* – 0D elements (not supported in STL);
2244* *4* – links (not supported in STL);
2245* *8* – faces.
2246
e5bd0d98 2247**Example:**
bf62b306 2248~~~~~
72b7576f 2249vinit
2250meshfromstl mesh myfile.stl
bf62b306 2251meshselmode mesh 1
2252~~~~~
72b7576f 2253
bf62b306 2254@subsubsection occt_draw_4_5_4 meshshadcolor
72b7576f 2255
bf62b306 2256Syntax:
2257~~~~~
2258meshshadcolor meshname red green blue
2259~~~~~
72b7576f 2260
ca0f3082 2261Changes the face interior color of object **meshname**. The *red*, *green* and *blue* are real values between *0* and *1*.
bf62b306 2262
e5bd0d98 2263**Example:**
bf62b306 2264~~~~~
72b7576f 2265vinit
2266meshfromstl mesh myfile.stl
bf62b306 2267meshshadcolormode mesh 0.5 0.5 0.5
2268~~~~~
72b7576f 2269
bf62b306 2270@subsubsection occt_draw_4_5_5 meshlinkcolor
72b7576f 2271
bf62b306 2272Syntax:
2273~~~~~
2274meshlinkcolor meshname red green blue
2275~~~~~
72b7576f 2276
bf62b306 2277Changes the color of face borders for object **meshname**. The *red*, *green* and *blue* are real values between *0* and *1*.
2278
e5bd0d98 2279**Example:**
bf62b306 2280~~~~~
72b7576f 2281vinit
2282meshfromstl mesh myfile.stl
bf62b306 2283meshlinkcolormode mesh 0.5 0.5 0.5
2284~~~~~
72b7576f 2285
bf62b306 2286@subsubsection occt_draw_4_5_6 meshmat
72b7576f 2287
bf62b306 2288Syntax:
2289~~~~~
2290meshmat meshname material
2291~~~~~
2292
2293Changes the material of object **meshname**.
2294
2295*material* is represented with an integer value as follows (equivalent to enumeration *Graphic3d_NameOfMaterial*):
2296* *0 – BRASS,*
2297* *1 – BRONZE,*
2298* *2 - COPPER,*
2299* *3 - GOLD,*
2300* *4 - PEWTER,*
2301* *5 - PLASTER,*
2302* *6 - PLASTIC,*
2303* *7 - SILVER,*
2304* *8 - STEEL,*
2305* *9 - STONE,*
2306* *10 - SHINY_PLASTIC,*
2307* *11 - SATIN,*
2308* *12 - METALIZED,*
2309* *13 - NEON_GNC,*
2310* *14 - CHROME,*
2311* *15 - ALUMINIUM,*
2312* *16 - OBSIDIAN,*
2313* *17 - NEON_PHC,*
2314* *18 - JADE,*
2315* *19 - DEFAULT,*
2316* *20 - UserDefined*
2317
e5bd0d98 2318**Example:**
bf62b306 2319~~~~~
72b7576f 2320vinit
2321meshfromstl mesh myfile.stl
2322meshmat mesh JADE
bf62b306 2323~~~~~
72b7576f 2324
bf62b306 2325@subsubsection occt_draw_4_5_7 meshshrcoef
72b7576f 2326
bf62b306 2327Syntax:
2328~~~~~
2329meshshrcoef meshname shrinkcoefficient
2330~~~~~
72b7576f 2331
bf62b306 2332Changes the value of shrink coefficient used in the shrink mode. In the shrink mode the face is shown as a congruent part of a usual face, so that *shrinkcoefficient* controls the value of this part. The *shrinkcoefficient* is a positive real number.
2333
e5bd0d98 2334**Example:**
bf62b306 2335~~~~~
72b7576f 2336vinit
2337meshfromstl mesh myfile.stl
bf62b306 2338meshshrcoef mesh 0.05
2339~~~~~
72b7576f 2340
bf62b306 2341@subsubsection occt_draw_4_5_8 meshshow
72b7576f 2342
bf62b306 2343Syntax:
2344~~~~~
2345meshshow meshname
2346~~~~~
72b7576f 2347
bf62b306 2348Displays **meshname** in the viewer (if it is erased).
2349
e5bd0d98 2350**Example:**
bf62b306 2351~~~~~
72b7576f 2352vinit
2353meshfromstl mesh myfile.stl
bf62b306 2354meshshow mesh
2355~~~~~
72b7576f 2356
bf62b306 2357@subsubsection occt_draw_4_5_9 meshhide
72b7576f 2358
bf62b306 2359Syntax:
2360~~~~~
2361meshhide meshname
2362~~~~~
72b7576f 2363
2364Hides **meshname** in the viewer.
72b7576f 2365
bf62b306 2366**Example:**
2367~~~~~
72b7576f 2368vinit
2369meshfromstl mesh myfile.stl
bf62b306 2370meshhide mesh
2371~~~~~
72b7576f 2372
bf62b306 2373@subsubsection occt_draw_4_5_10 meshhidesel
72b7576f 2374
bf62b306 2375Syntax:
2376~~~~~
2377meshhidesel meshname
2378~~~~~
72b7576f 2379
2380Hides only selected entities. The other part of **meshname** remains visible.
2381
bf62b306 2382@subsubsection occt_draw_4_5_11 meshshowsel
72b7576f 2383
bf62b306 2384Syntax:
2385~~~~~
2386meshshowsel meshname
2387~~~~~
72b7576f 2388
2389Shows only selected entities. The other part of **meshname** becomes invisible.
2390
bf62b306 2391@subsubsection occt_draw_4_5_12 meshshowall
72b7576f 2392
bf62b306 2393Syntax:
2394~~~~~
2395meshshowall meshname
2396~~~~~
72b7576f 2397
2398Changes the state of all entities to visible for **meshname**.
2399
bf62b306 2400@subsubsection occt_draw_4_5_13 meshdelete
72b7576f 2401
bf62b306 2402Syntax:
2403~~~~~
2404meshdelete meshname
2405~~~~~
72b7576f 2406
2407Deletes MeshVS_Mesh object **meshname**.
72b7576f 2408
bf62b306 2409**Example:**
2410~~~~~
72b7576f 2411vinit
2412meshfromstl mesh myfile.stl
2413meshdelete mesh
bf62b306 2414~~~~~
72b7576f 2415
bf62b306 2416@section occt_draw_5 OCAF commands
72b7576f 2417
2418
2419This chapter contains a set of commands for Open CASCADE Technology Application Framework (OCAF).
2420
2421
bf62b306 2422@subsection occt_draw_5_1 Application commands
72b7576f 2423
2424
bf62b306 2425@subsubsection occt_draw_5_1_1 NewDocument
72b7576f 2426
bf62b306 2427Syntax:
2428~~~~~
2429NewDocument docname [format]
2430~~~~~
72b7576f 2431
2432Creates a new **docname** document with MDTV-Standard or described format.
72b7576f 2433
bf62b306 2434**Example:**
2435~~~~~
72b7576f 2436# Create new document with default (MDTV-Standard) format
2437NewDocument D
2438
2439# Create new document with BinOcaf format
2440NewDocument D2 BinOcaf
bf62b306 2441~~~~~
72b7576f 2442
bf62b306 2443@subsubsection occt_draw_5_1_2 IsInSession
72b7576f 2444
bf62b306 2445Syntax:
2446~~~~~
2447IsInSession path
2448~~~~~
72b7576f 2449
bf62b306 2450Returns *0*, if **path** document is managed by the application session, *1* – otherwise.
72b7576f 2451
bf62b306 2452**Example:**
2453~~~~~
72b7576f 2454IsInSession /myPath/myFile.std
bf62b306 2455~~~~~
72b7576f 2456
bf62b306 2457@subsubsection occt_draw_5_1_3 ListDocuments
72b7576f 2458
bf62b306 2459Syntax:
2460~~~~~
2461ListDocuments
2462~~~~~
72b7576f 2463
2464Makes a list of documents handled during the session of the application.
2465
2466
bf62b306 2467@subsubsection occt_draw_5_1_4 Open
72b7576f 2468
bf62b306 2469Syntax:
2470~~~~~
2471Open path docname
2472~~~~~
72b7576f 2473
2474Retrieves the document of file **docname** in the path **path**. Overwrites the document, if it is already in session.
72b7576f 2475
bf62b306 2476**Example:**
2477~~~~~
2478Open /myPath/myFile.std D
2479~~~~~
72b7576f 2480
bf62b306 2481@subsubsection occt_draw_5_1_5 Close
72b7576f 2482
bf62b306 2483Syntax:
2484~~~~~
2485Close docname
2486~~~~~
72b7576f 2487
2488Closes **docname** document. The document is no longer handled by the applicative session.
72b7576f 2489
bf62b306 2490**Example:**
2491~~~~~
72b7576f 2492Close D
bf62b306 2493~~~~~
72b7576f 2494
bf62b306 2495@subsubsection occt_draw_5_1_6 Save
72b7576f 2496
bf62b306 2497Syntax:
2498~~~~~
2499Save docname
2500~~~~~
72b7576f 2501
2502Saves **docname** active document.
72b7576f 2503
bf62b306 2504**Example:**
2505~~~~~
72b7576f 2506Save D
bf62b306 2507~~~~~
72b7576f 2508
bf62b306 2509@subsubsection occt_draw_5_1_7 SaveAs
72b7576f 2510
bf62b306 2511Syntax:
2512~~~~~
2513SaveAs docname path
2514~~~~~
72b7576f 2515
2516Saves the active document in the file **docname** in the path **path**. Overwrites the file if it already exists.
72b7576f 2517
bf62b306 2518**Example:**
2519~~~~~
2520SaveAs D /myPath/myFile.std
2521~~~~~
72b7576f 2522
ba06f8bb 2523@subsection occt_draw_5_2 Basic commands
72b7576f 2524
ba06f8bb 2525@subsubsection occt_draw_5_2_1 Label
72b7576f 2526
ba06f8bb 2527Syntax:
72b7576f 2528
bf62b306 2529~~~~~
2530Label docname entry
2531~~~~~
72b7576f 2532
ba06f8bb 2533Creates the label expressed by <i>\<entry\></i> if it does not exist.
72b7576f 2534
bf62b306 2535Example
2536~~~~~
2537Label D 0:2
2538~~~~~
72b7576f 2539
ba06f8bb 2540@subsubsection occt_draw_5_2_2 NewChild
72b7576f 2541
ba06f8bb 2542Syntax:
72b7576f 2543
bf62b306 2544~~~~~
2545NewChild docname [taggerlabel = Root label]
2546~~~~~
ba06f8bb 2547Finds (or creates) a *TagSource* attribute located at father label of <i>\<taggerlabel\></i> and makes a new child label.
72b7576f 2548
bf62b306 2549Example
2550~~~~~
2551# Create new child of root label
2552NewChild D
72b7576f 2553
bf62b306 2554# Create new child of existing label
2555Label D 0:2
2556NewChild D 0:2
2557~~~~~
72b7576f 2558
ba06f8bb 2559@subsubsection occt_draw_5_2_3 Children
72b7576f 2560
ba06f8bb 2561Syntax:
bf62b306 2562~~~~~
2563Children docname label
2564~~~~~
2565Returns the list of attributes of label.
72b7576f 2566
bf62b306 2567Example
2568~~~~~
2569Children D 0:2
2570~~~~~
72b7576f 2571
ba06f8bb 2572@subsubsection occt_draw_5_2_4 ForgetAll
72b7576f 2573
ba06f8bb 2574Syntax:
bf62b306 2575~~~~~
2576ForgetAll docname label
2577~~~~~
2578Forgets all attributes of the label.
72b7576f 2579
bf62b306 2580Example
2581~~~~~
2582ForgetAll D 0:2
2583~~~~~
72b7576f 2584
72b7576f 2585
bf62b306 2586@subsubsection occt_draw_5_3 Application commands
72b7576f 2587
bf62b306 2588@subsubsection occt_draw_5_3_1 Main
72b7576f 2589
bf62b306 2590Syntax:
2591~~~~~
2592Main docname
2593~~~~~
72b7576f 2594
2595Returns the main label of the framework.
72b7576f 2596
bf62b306 2597**Example:**
2598~~~~~
72b7576f 2599Main D
bf62b306 2600~~~~~
72b7576f 2601
bf62b306 2602@subsubsection occt_draw_5_3_2 UndoLimit
72b7576f 2603
bf62b306 2604Syntax:
2605~~~~~
2606UndoLimit docname [value=0]
2607~~~~~
72b7576f 2608
2609
bf62b306 2610Sets 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
72b7576f 2611
bf62b306 2612**Example:**
2613~~~~~
72b7576f 2614UndoLimit D 100
bf62b306 2615~~~~~
72b7576f 2616
bf62b306 2617@subsubsection occt_draw_5_3_3 Undo
72b7576f 2618
bf62b306 2619Syntax:
2620~~~~~
2621Undo docname [value=1]
2622~~~~~
72b7576f 2623
2624Undoes **value** steps.
72b7576f 2625
bf62b306 2626**Example:**
2627~~~~~
72b7576f 2628Undo D
bf62b306 2629~~~~~
72b7576f 2630
bf62b306 2631@subsubsection occt_draw_5_3_4 Redo
72b7576f 2632
bf62b306 2633Syntax:
2634~~~~~
2635Redo docname [value=1]
2636~~~~~
72b7576f 2637
bf62b306 2638Redoes **value** steps.
2639
e5bd0d98 2640**Example:**
bf62b306 2641~~~~~
72b7576f 2642Redo D
bf62b306 2643~~~~~
72b7576f 2644
bf62b306 2645@subsubsection occt_draw_5_3_5 OpenCommand
72b7576f 2646
bf62b306 2647Syntax:
2648~~~~~
2649OpenCommand docname
2650~~~~~
72b7576f 2651
2652Opens a new command transaction.
72b7576f 2653
bf62b306 2654**Example:**
2655~~~~~
2656OpenCommand D
2657~~~~~
72b7576f 2658
bf62b306 2659@subsubsection occt_draw_5_3_6 CommitCommand
72b7576f 2660
bf62b306 2661Syntax:
2662~~~~~
2663CommitCommand docname
2664~~~~~
72b7576f 2665
2666Commits the Command transaction.
72b7576f 2667
bf62b306 2668**Example:**
2669~~~~~
2670CommitCommand D
2671~~~~~
72b7576f 2672
bf62b306 2673@subsubsection occt_draw_5_3_7 NewCommand
72b7576f 2674
bf62b306 2675Syntax:
2676~~~~~
2677NewCommand docname
2678~~~~~
72b7576f 2679
2680This is a short-cut for Commit and Open transaction.
72b7576f 2681
bf62b306 2682**Example:**
2683~~~~~
72b7576f 2684NewCommand D
bf62b306 2685~~~~~
72b7576f 2686
bf62b306 2687@subsubsection occt_draw_5_3_8 AbortCommand
72b7576f 2688
bf62b306 2689Syntax:
2690~~~~~
2691AbortCommand docname
2692~~~~~
72b7576f 2693
2694Aborts the Command transaction.
72b7576f 2695
bf62b306 2696**Example:**
2697~~~~~
72b7576f 2698AbortCommand D
bf62b306 2699~~~~~
2700
2701@subsubsection occt_draw_5_3_9 Copy
72b7576f 2702
bf62b306 2703Syntax:
2704~~~~~
2705Copy docname entry Xdocname Xentry
2706~~~~~
72b7576f 2707
bf62b306 2708Copies the contents of *entry* to *Xentry*. No links are registered.
72b7576f 2709
e5bd0d98 2710**Example:**
bf62b306 2711~~~~~
72b7576f 2712Copy D1 0:2 D2 0:4
bf62b306 2713~~~~~
72b7576f 2714
bf62b306 2715@subsubsection occt_draw_5_3_10 UpdateLink
72b7576f 2716
bf62b306 2717Syntax:
2718~~~~~
2719UpdateLink docname [entry]
2720~~~~~
72b7576f 2721
bf62b306 2722Updates external reference set at *entry*.
72b7576f 2723
bf62b306 2724**Example:**
2725~~~~~
72b7576f 2726UpdateLink D
bf62b306 2727~~~~~
72b7576f 2728
bf62b306 2729@subsubsection occt_draw_5_3_11 CopyWithLink
72b7576f 2730
bf62b306 2731Syntax:
2732~~~~~
2733CopyWithLink docname entry Xdocname Xentry
2734~~~~~
72b7576f 2735
2736Aborts the Command transaction.
bf62b306 2737Copies the content of *entry* to *Xentry*. The link is registered with an *Xlink* attribute at *Xentry* label.
2738
e5bd0d98 2739**Example:**
bf62b306 2740~~~~~
2741CopyWithLink D1 0:2 D2 0:4
2742~~~~~
72b7576f 2743
bf62b306 2744@subsubsection occt_draw_5_3_12 UpdateXLinks
72b7576f 2745
bf62b306 2746Syntax:
2747~~~~~
2748UpdateXLinks docname entry
2749~~~~~
72b7576f 2750
bf62b306 2751Sets modifications on labels impacted by external references to the *entry*. The *document* becomes invalid and must be recomputed
72b7576f 2752
e5bd0d98 2753**Example:**
bf62b306 2754~~~~~
72b7576f 2755UpdateXLinks D 0:2
bf62b306 2756~~~~~
72b7576f 2757
bf62b306 2758@subsubsection occt_draw_5_3_13 DumpDocument
72b7576f 2759
bf62b306 2760Syntax:
2761~~~~~
2762DumpDocument docname
2763~~~~~
72b7576f 2764
bf62b306 2765Displays parameters of *docname* document.
72b7576f 2766
bf62b306 2767**Example:**
2768~~~~~
72b7576f 2769DumpDocument D
bf62b306 2770~~~~~
2771
72b7576f 2772
bf62b306 2773@subsection occt_draw_5_4 Data Framework commands
72b7576f 2774
2775
bf62b306 2776@subsubsection occt_draw_5_4_1 MakeDF
72b7576f 2777
bf62b306 2778Syntax:
2779~~~~~
2780MakeDF dfname
2781~~~~~
72b7576f 2782
2783Creates a new data framework.
72b7576f 2784
bf62b306 2785**Example:**
2786~~~~~
72b7576f 2787MakeDF D
bf62b306 2788~~~~~
72b7576f 2789
bf62b306 2790@subsubsection occt_draw_5_4_2 ClearDF
72b7576f 2791
bf62b306 2792Syntax:
2793~~~~~
2794ClearDF dfname
2795~~~~~
72b7576f 2796
2797Clears a data framework.
72b7576f 2798
bf62b306 2799**Example:**
2800~~~~~
72b7576f 2801ClearDF D
bf62b306 2802~~~~~
72b7576f 2803
bf62b306 2804@subsubsection occt_draw_5_4_3 CopyDF
72b7576f 2805
bf62b306 2806Syntax:
2807~~~~~
2808CopyDF dfname1 entry1 [dfname2] entry2
2809~~~~~
72b7576f 2810
2811Copies a data framework.
72b7576f 2812
bf62b306 2813**Example:**
2814~~~~~
72b7576f 2815CopyDF D 0:2 0:4
bf62b306 2816~~~~~
72b7576f 2817
bf62b306 2818@subsubsection occt_draw_5_4_4 CopyLabel
72b7576f 2819
bf62b306 2820Syntax:
2821~~~~~