* The graphical commands.
* The Geometry set of commands.
* The Topology set of commands.
-
-This document does not describe other sets of commands and does not explain how to extend Draw using C++.
+ * OCAF commands.
+ * Data Exchange commands
+ * Shape Healing commands
This document is a reference manual. It contains a full description of each command. All descriptions have the format illustrated below for the exit command.
**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.
+@subsubsection occt_draw_2_3_3 del, dall
+
+Syntax:
+~~~~~
+del varname_pattern [varname_pattern ...]
+dall
+~~~~~
+
+*del* command does the same thing as *unset*, but it deletes the variables matched by the pattern.
+
+*dall* command deletes all variables in the session.
@subsection occt_draw_2_4 lists
Syntax:
-~~~~~~
+~~~~~
while condition script
for init condition reinit script
foreach varname list script
**Note** The behavior of *whatis* on other variables (not Draw) is not excellent.
-@subsubsection occt_draw_3_2_3 rename, copy
+@subsubsection occt_draw_3_2_3 renamevar, copy
Syntax:
~~~~~
-rename varname tovarname [varname tovarname ...]
+renamevar varname tovarname [varname tovarname ...]
copy varname tovarname [varname tovarname ...]
~~~~~
- * **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.
+ * **renamevar** changes the name of a Draw variable. The original variable will no longer exist. Note that the content is not modified. Only the name is changed.
* **copy** creates a new variable with a copy of the content of an existing variable. The exact behavior of **copy** is type dependent; in the case of certain topological variables, the content may still be shared.
**Example:**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
circle c1 0 0 1 0 5
-rename c1 c2
+renamevar c1 c2
# curves are copied, c2 will not be modified
copy c2 c3
# p0, p1, p2, ....
# give a name to a graphic object
-rename . x
+renamevar . x
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2dclear
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@subsubsection occt_draw_4_1_14_1 disp, don, era
+
+These commands have the same meaning as correspondingly display, donly and erase, but with the difference that they evaluate the arguments using glob pattern rules. For example, to display all objects with names d_1, d_2, d_3, etc. it is enouth to run the command:
+~~~~~{.cpp}
+disp d_*
+~~~~~
+
@subsubsection occt_draw_4_1_15 repaint, dflush
Syntax:
~~~~~
-vtrihedron name [X0] [Y0] [Z0] [Zu] [Zv] [Zw] [Xu] [Xv] [Xw]
+vtrihedron name [-dispMode {wf|sh|wireframe|shading}]
+ [-origin x y z ]
+ [-zaxis u v w -xaxis u v w ]
+ [-drawaxes {X|Y|Z|XY|YZ|XZ|XYZ}]
+ [-hidelabels {on|off}]"
+ [-label {XAxis|YAxis|ZAxis} value]"
+ [-attribute {XAxisLength|YAxisLength|ZAxisLength
+ |TubeRadiusPercent|ConeRadiusPercent"
+ |ConeLengthPercent|OriginRadiusPercent"
+ |ShadingNumberOfFacettes} value]"
+ [-color {Origin|XAxis|YAxis|ZAxis|XOYAxis|YOZAxis"
+ |XOZAxis|Whole} {r g b | colorName}]"
+ [-textcolor {r g b | colorName}]"
+ [-arrowscolor {r g b | colorName}]"
+ [-priority {Origin|XAxis|YAxis|ZAxis|XArrow"
+ |YArrow|ZArrow|XOYAxis|YOZAxis"
+ |XOZAxis|Whole} value]
+
~~~~~
-Creates a new *AIS_Trihedron* object. If no argument is set, the default trihedron (0XYZ) is created.
-
+Creates a new *AIS_Trihedron* object or changes existing trihedron. If no argument is set, the default trihedron (0XYZ) is created.
+
**Example:**
~~~~~
vinit
-vtrihedron tr
+vtrihedron tr1
+
+vtrihedron t2 -dispmode shading -origin -200 -200 -300
+vtrihedron t2 -color XAxis Quantity_NOC_RED
+vtrihedron t2 -color YAxis Quantity_NOC_GREEN
+vtrihedron t2 -color ZAxis|Origin Quantity_NOC_BLUE1
~~~~~
@subsubsection occt_draw_4_4_2 vplanetri
vdimparam dim1 -autovalue
~~~~~
-@subsubsection occt_draw_4_4_22 vdimangleparam
+@subsubsection occt_draw_4_4_22 vangleparam
Syntax:
~~~~~
vangleparam dim1 -type exterior -showarrow first
~~~~~
-@subsubsection occt_draw_4_4_23 vmovedim
+@subsubsection occt_draw_4_4_23 vlengthparam
+
+Syntax:
+~~~~~
+vlengthparam name [-type interior|exterior]
+ [-showarrow first|second|both|none]
+~~~~~
+
+Sets parameters for length dimension **name**.
+
+**Example:**
+~~~~~
+vinit
+vpoint p1 20 20 0
+vpoint p2 80 80 0
+vdimension dim1 -length -plane xoy -shapes p1 p2
+vtop
+vfit
+vzoom 0.5
+vlengthparam dim1 -direction ox
+~~~~~
+
+@subsubsection occt_draw_4_4_24 vmovedim
Syntax:
~~~~~
Creates a window for VTK viewer.
-@figure{/user_guides/draw_test_harness/images/draw_image001.png}
+@figure{/user_guides/draw_test_harness/images/draw_image001.png,"",225}
@subsubsection occt_draw_4_6_2 ivtkdisplay
ivtkdisplay c
~~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image002.png}
+@figure{/user_guides/draw_test_harness/images/draw_image002.png,"",261}
+
@subsubsection occt_draw_4_6_3 ivtkerase
ivtksetdispmode c 1
~~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image003.png}
-
+@figure{/user_guides/draw_test_harness/images/draw_image003.png,"",262}
+
@subsubsection occt_draw_4_6_6 ivtksetselmode
Syntax:
ivtksetselmode a 4 1
~~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image004.png}
+@figure{/user_guides/draw_test_harness/images/draw_image004.png,"",291}
@subsubsection occt_draw_4_6_7 ivtkmoveto
ivtkbgcolor 200 220 250
~~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image005.png}
+@figure{/user_guides/draw_test_harness/images/draw_image005.png,"",196}
~~~~~
ivtkbgcolor 10 30 80 255 255 255
~~~~~
-@figure{/user_guides/draw_test_harness/images/draw_image006.png}
-
+@figure{/user_guides/draw_test_harness/images/draw_image006.png,"",190}
@section occt_draw_5 OCAF commands
-
This chapter contains a set of commands for Open CASCADE Technology Application Framework (OCAF).
# the values of u and v are : 0 5
~~~~~
-@subsubsection occt_draw_6_6_6 proj, dproj
+@subsubsection occt_draw_6_6_6 proj, 2dproj
Syntax:
~~~~~
0 30 0 10 30 0 20 30 0
~~~~~
-@subsection occt_draw_6_9 Constraints
+@subsection occt_draw_6_9 Projections
+
+Draw provides commands to project points/curves on curves/surfaces.
+
+* **proj** projects point on the curve/surface (see @ref occt_draw_6_6_6 "proj command description");
+* **project** projects 3D curve on the surface (see @ref occt_draw_6_2_11 "project command description");
+* **projponf** projects point on the face.
+
+@subsubsection occt_draw_6_9_1 projponf
+
+Syntax:
+~~~~~
+projponf face pnt [extrema flag: -min/-max/-minmax] [extrema algo: -g(grad)/-t(tree)]
+~~~~~
+
+**projponf** projects point *pnt* on the face *face*.
+You can change the Extrema options:
+* To change the Extrema search algorithm use the following options:<br>
+ -g - for Grad algorithm;<br>
+ -t - for Tree algorithm;
+* To change the Extrema search solutions use the following options:<br>
+ -min - to look for Min solutions;<br>
+ -max - to look for Max solutions;<br>
+ -minmax - to look for MinMax solutions.
+
+**Example**
+~~~~~
+plane p 0 0 0 0 0 1
+mkface f p
+point pnt 5 5 10
+
+projponf f pnt
+# proj dist = 10
+# uvproj = 5 5
+# pproj = 5 5 0
+~~~~~
+
+@subsection occt_draw_6_10 Constraints
* **cirtang** constructs 2d circles tangent to curves;
* **lintan** constructs 2d lines tangent to curves.
-@subsubsection occt_draw_6_9_1 cirtang
+@subsubsection occt_draw_6_10_1 cirtang
Syntax:
~~~~~
== c_1 c_2
~~~~~
-@subsubsection occt_draw_6_9_2 lintan
+@subsubsection occt_draw_6_10_2 lintan
Syntax:
~~~~~
lintan l1 c1 l 15
~~~~~
-@subsection occt_draw_6_10 Display
+@subsection occt_draw_6_11 Display
Draw provides commands to control the display of geometric objects. Some display parameters are used for all objects, others are valid for surfaces only, some for bezier and bspline only, and others for bspline only.
On bspline curves and surfaces you can toggle the display of the knots with the **shknots** and **clknots** commands.
-@subsubsection occt_draw_6_10_1 dmod, discr, defle
+@subsubsection occt_draw_6_11_1 dmod, discr, defle
Syntax:
~~~~~
dmode c u
~~~~~
-@subsubsection occt_draw_6_10_2 nbiso
+@subsubsection occt_draw_6_11_2 nbiso
Syntax:
~~~~~
nbiso s 35 15
~~~~~
-@subsubsection occt_draw_6_10_3 clpoles, shpoles
+@subsubsection occt_draw_6_11_3 clpoles, shpoles
Syntax:
~~~~~
clpoles c
~~~~~
-@subsubsection occt_draw_6_10_4 clknots, shknots
+@subsubsection occt_draw_6_11_4 clknots, shknots
Syntax:
~~~~~
compound b1 b2 b3 c
~~~~~
-@subsubsection occt_draw_7_1_5 checkshape
-Syntax:
+@subsubsection occt_draw_7_1_5 compare
+
+Syntax:
~~~~~
-checkshape [-top] shape [result] [-short]
+compare shape1 shape2
~~~~~
-Where:
-* *top* -- optional parameter, which allows checking only topological validity of a shape.
-* *shape* -- the only required parameter which represents the name of the shape to check.
-* *result* -- optional parameter which is the prefix of the output shape names.
-* *short* -- a short description of the check.
+**compare** compares the two shapes *shape1* and *shape2* using the methods *TopoDS_Shape::IsSame()* and *TopoDS_Shape::IsEqual()*.
-**checkshape** examines the selected object for topological and geometric coherence. The object should be a three dimensional shape.
+**Example**
+~~~~~
+box b1 1 1 1
+copy b1 b2
+compare b1 b2
+# same shapes
+# equal shapes
-**Example:**
+orientation b2 R
+compare b1 b2
+# same shapes
+
+box b2 1 1 1
+compare b1 b2
+# shapes are not same
~~~~~
-# checkshape returns a comment valid or invalid
-box b1 0 0 0 1 1 1
-checkshape b1
-# returns the comment
-this shape seems to be valid
+
+@subsubsection occt_draw_7_1_6 issubshape
+
+Syntax:
+~~~~~
+issubshape subshape shape
~~~~~
-**Note** that this test is performed using the tolerance set in the algorithm.
+**issubshape** checks if the shape *subshape* is sub-shape of the shape *shape* and gets its index in the shape.
+
+**Example**
+~~~~~
+box b 1 1 1
+explode b f
+issubshape b_2 b
+# b_2 is sub-shape of b. Index in the shape: 2.
+~~~~~
@subsection occt_draw_7_2 Curve and surface topology
vertex v1 10 20 30
~~~~~
+@subsubsection occt_draw_7_2_1a mkpoint
+
+Syntax:
+~~~~~
+mkpoint name vertex
+~~~~~
+
+Creates a point from the coordinates of a given vertex.
+
+**Example:**
+~~~~~
+mkpoint p v1
+~~~~~
+
@subsubsection occt_draw_7_2_2 edge, mkedge, uisoedge, visoedge
Syntax:
@subsubsection occt_draw_7_2_6 mkoffset
+**mkoffset** creates a parallel wire in the same plane using a face or an existing continuous set of wires as a reference. The number of occurrences is not limited.
+The offset distance defines the spacing and the positioning of the occurrences.
+
Syntax:
~~~~~
-mkoffset result face/compound of wires nboffset stepoffset
+mkoffset result shape nboffset stepoffset [jointype(a/i) [alt]]
~~~~~
+where:
+* *result* - the base name for the resulting wires. The index of the occurrence (starting with 1) will be added to this name, so the resulting wires will have the names - *result_1*, *result_2* ...;
+* *shape* - input shape (face or compound of wires);
+* *nboffset* - the number of the parallel occurrences;
+* *stepoffset* - offset distance between occurrences;
+* *jointype(a/i)* - join type (a for *arc* (default) and i for *intersection*);
+* *alt* - altitude from the plane of the input face in relation to the normal to the face.
-**mkoffset** creates a parallel wire in the same plane using a face or an existing continuous set of wires as a reference. The number of occurences is not limited.
-
-The offset distance defines the spacing and the positioning of the occurences.
**Example:**
~~~~~
-#Create a box and select a face
+# Create a box and select a face
box b 1 2 3
explode b f
-#Create three exterior parallel contours with an offset
-value of 2
+# Create three exterior parallel contours with an offset value of 2
mkoffset r b_1 3 2
-Create one interior parallel contour with an offset
-value of
-0.4
+# wires r_1, r_2 and r_3 are created
+
+# Create three exterior parallel contours with an offset value of 2 without round corners
+mkoffset r b_1 3 2 i
+# wires r_1, r_2 and r_3 are created
+
+# Create one interior parallel contour with an offset value of 0.4
mkoffset r b_1 1 -0.4
~~~~~
-**Note** that *mkoffset* command must be used with prudence, as angular contours produce offset contours with fillets. Interior parallel contours can produce more than one wire, normally these are refused. In the following example, any increase in the offset value is refused.
+**Note** that on a concave input contour for an interior step *mkoffset* command may produce several wires which will be contained in a single compound.
**Example:**
~~~~~
# to create the example contour
profile p F 0 0 x 2 y 4 tt 1 1 tt 0 4 w
-# to create an incoherent interior offset
-mkoffset r p 1 -0.50
-==p is not a FACE but a WIRE
-BRepFill_TrimEdgeTool: incoherent intersection
-# to create two incoherent wires
+# creates an incoherent interior offset
mkoffset r p 1 -0.50
+
+# creates two incoherent wires
+mkoffset r p 1 -0.55
+# r_1 is a compound of two wires
~~~~~
@subsubsection occt_draw_7_2_7 mkplane, mkface
* Use the **depouille** command for drafting.
* Use the **chamf** command to add a chamfer to an edge
* Use the **blend** command for simple blending.
- * Use **fubl** for a fusion + blending operation.
+ * Use **bfuseblend** for a fusion + blending operation.
+ * Use **bcutblend** for a cut + blending operation.
* Use **buildevol**, **mkevol**, **updatevol** to realize varying radius blending.
==- SetRegul 0s
~~~~~
-@subsubsection occt_draw_7_8_4 fubl
+@subsubsection occt_draw_7_8_4 bfuseblend
-Syntax:
+Syntax:
+~~~~~
+bfuseblend name shape1 shape2 radius [-d]
~~~~~
-fubl name shape1 shape2 radius
-~~~~~
-Creates a boolean fusion of two shapes and then blends (fillets) the intersection edges using the given radius.
+Creates a boolean fusion of two shapes and then blends (fillets) the intersection edges using the given radius.
+Option [-d] enables the Debugging mode in which the error messages, if any, will be printed.
-**Example:**
+**Example:**
~~~~~
-# fuse-blend two boxes
-box b1 20 20 5
-copy b1 b2
-ttranslate b2 -10 10 3
-fubl a b1 b2 1
+# fuse-blend two boxes
+box b1 20 20 5
+copy b1 b2
+ttranslate b2 -10 10 3
+bfuseblend a b1 b2 1
~~~~~
+@subsubsection occt_draw_7_8_4a bcutblend
+
+Syntax:
+~~~~~
+bcutblend name shape1 shape2 radius [-d]
+~~~~~
+
+Creates a boolean cut of two shapes and then blends (fillets) the intersection edges using the given radius.
+Option [-d] enables the Debugging mode in which the error messages, if any, will be printed.
+
+**Example:**
+~~~~~
+# cut-blend two boxes
+box b1 20 20 5
+copy b1 b2
+ttranslate b2 -10 10 3
+bcutblend a b1 b2 1
+~~~~~
@subsubsection occt_draw_7_8_5 mkevol, updatevol, buildevol
@subsection occt_draw_7_9 Analysis of topology and geometry
-Analysis of shapes includes commands to compute length, area, volumes and inertial properties.
+Analysis of shapes includes commands to compute length, area, volumes and inertial properties, as well as to compute some aspects impacting shape validity.
* Use **lprops**, **sprops**, **vprops** to compute integral properties.
* Use **bounding** to display the bounding box of a shape.
* Use **distmini** to calculate the minimum distance between two shapes.
* Use **xdistef**, **xdistcs**, **xdistcc**, **xdistc2dc2dss**, **xdistcc2ds** to check the distance between two objects on even grid.
+ * Use **checkshape** to check validity of the shape.
+ * Use **tolsphere** to see the tolerance spheres of all vertices in the shape.
+ * Use **validrange** to check range of an edge not covered by vertices.
@subsubsection occt_draw_7_9_1 lprops, sprops, vprops
xdistc2dc2dss c2d1_1 c2d2_1 s1 s2 0 1 1000
~~~~~
+@subsubsection occt_draw_7_9_5 checkshape
+
+Syntax:
+~~~~~
+checkshape [-top] shape [result] [-short]
+~~~~~
+
+Where:
+* *top* -- optional parameter, which allows checking only topological validity of a shape.
+* *shape* -- the only required parameter which represents the name of the shape to check.
+* *result* -- optional parameter which is the prefix of the output shape names.
+* *short* -- a short description of the check.
+
+**checkshape** examines the selected object for topological and geometric coherence. The object should be a three dimensional shape.
+
+**Example:**
+~~~~~
+# checkshape returns a comment valid or invalid
+box b1 0 0 0 1 1 1
+checkshape b1
+# returns the comment
+this shape seems to be valid
+~~~~~
+
+@subsubsection occt_draw_7_9_6 tolsphere
+
+Syntax:
+~~~~~
+tolsphere shape
+~~~~~
+
+Where:
+* *shape* -- the name of the shape to process.
+
+**tolsphere** shows vertex tolerances by drawing spheres around each vertex in the shape. Each sphere is assigned a name of the shape with suffix "_vXXX", where XXX is the number of the vertex in the shape.
+
+**Example:**
+~~~~~
+# tolsphere returns all names of created spheres.
+box b1 0 0 0 1 1 1
+settolerance b1 0.05
+tolsphere b1
+# creates spheres and returns the names
+b1_v1 b1_v2 b1_v3 b1_v4 b1_v5 b1_v6 b1_v7 b1_v8
+~~~~~
+
+@subsubsection occt_draw_7_9_7 validrange
+
+Syntax:
+~~~~~
+validrange edge [(out) u1 u2]
+~~~~~
+
+Where:
+* *edge* -- the name of the edge to analyze.
+* *u1*, *u2* -- optional names of variables to put the range into.
+
+**validrange** computes valid range of the edge. If *u1* and *u2* are not given it returns first and last parameters. Otherwise, it sets the variables u1 and u2.
+
+**Example:**
+~~~~~
+circle c 0 0 0 10
+mkedge e c
+mkedge e c 0 pi
+validrange e
+# returns the range
+1.9884375000000002e-008 3.1415926337054181
+validrange e u1 u2
+dval u1
+1.9884375000000002e-008
+dval u2
+3.1415926337054181
+~~~~~
+
@subsection occt_draw_7_10 Surface creation
Changes the NURBS curve definition of a shape to a Bspline curve definition. This conversion is required for assymetric deformation and prepares the arguments for other commands such as **deform**. The conversion can be necessary when transferring shape data to other applications.
+@subsubsection occt_draw_7_11_6 edgestofaces
+
+**edgestofaces** - The command allows building planar faces from the planar edges randomly located in 3D space.
+
+It has the following syntax:
+~~~~
+edgestofaces r_faces edges [-a AngTol -s Shared(0/1)]
+~~~~
+Options:
+ * -a AngTol - angular tolerance used for distinguishing the planar faces;
+ * -s Shared(0/1) - boolean flag which defines whether the input edges are already shared or have to be intersected.
+
+
@subsection occt_draw_7_12 Texture Mapping to a Shape
Texture mapping allows you to map textures on a shape. Textures are texture image files and several are predefined. You can control the number of occurrences of the texture on a face, the position of a texture and the scale factor of the texture.
@section occt_draw_20 General Fuse Algorithm commands
-This chapter describes existing commands of Open CASCADE Draw Test Harness that are used for debugging of General Fuse Algorithm (GFA). It is also applicable for Boolean Operations Algorithm (BOA) and Partition Algorithm (PA) because these algorithms are subclasses of GFA.
+This chapter describes existing commands of Open CASCADE Draw Test Harness that are used for debugging of General Fuse Algorithm (GFA). It is also applicable for all General Fuse based algorithms such as Boolean Operations Algorithm (BOA), Splitter Algorithm (SPA), Cells Builder Algorithm etc.
See @ref occt_user_guides__boolean_operations "Boolean operations" user's guide for the description of these algorithms.
The following terms and definitions are used in this document:
* **Objects** -- list of shapes that are arguments of the algorithm.
-* **Tools** -- list of shapes that are arguments of the algorithm. Difference between Objects and Tools is defined by specific requirements of the operations (Boolean Operations, Partition Operation).
+* **Tools** -- list of shapes that are arguments of the algorithm. Difference between Objects and Tools is defined by specific requirements of the operations (Boolean Operations, Splitting Operation).
* **DS** -- internal data structure used by the algorithm (*BOPDS_DS* object).
* **PaveFiller** -- intersection part of the algorithm (*BOPAlgo_PaveFiller* object).
* **Builder** -- builder part of the algorithm (*BOPAlgo_Builder* object).
* **baddobjects** *S1 S2...Sn* -- adds shapes *S1, S2, ... Sn* as Objects;
* **baddtools** *S1 S2...Sn* -- adds shapes *S1, S2, ... Sn* as Tools;
* **bfillds** -- performs the Intersection Part of the Algorithm;
-* **bbuild** *r* -- performs the Building Part of the Algorithm; *r* is the resulting shape.
+* **bbuild** *r* -- performs the Building Part of the Algorithm (General Fuse operation); *r* is the resulting shape;
+* **bsplit** *r* -- performs the Splitting operation; *r* is the resulting shape;
+* **bbop** *r* *iOp* -- performs the Boolean operation; *r* is the resulting shape; *iOp* - type of the operation (0 - COMMON; 1 - FUSE; 2 - CUT; 3 - CUT21; 4 - SECTION);
+* **bcbuild** *rx* -- performs initialization of the *Cells Builder* algorithm (see @ref occt_algorithms_10c_Cells_1 "Usage of the Cells Builder algorithm" for more details).
@subsection occt_draw_20_3 Commands for Intersection Part
==Param = -0.20000000000000001 Gap = 5.0009999000199947
~~~~~
-@subsubsection occt_draw_9_1_14 projface
+@subsubsection occt_draw_9_1_14 projpcurve
+
+Syntax:
+~~~~~
+projpcurve <edge> <face> <Tol> <X> <Y> <Z> [<start_param>]
+~~~~~
+
+**projpcurve** returns the projection of a given point on a given curve on surface. The curve on surface is defined by giving the edge and face names. Edge must have curve 2D repesentation on the face. Optional parameter <i>\<start_param\></i> is any parameter of pcurve, which is used by algoritm as start point for searching projection of given point with help of local Extrema algorithm. If this parameter is not set, algorithm uses whole parametric interval of pcurve for searching projection.
+
+**Example:**
+
+~~~~~
+# Using global searching
+projpcurve f_1 f 1.e-7 0.877 0 0.479
+==Point: 0.87762772831890712 0 0.47934285275342808
+==Param: 0.49990578239977856
+==Dist: 0.0007152557954264938
+~~~~~
+
+~~~~~
+# Using starting parameter on edge
+projpcurve f_1 f 1.e-7 0.877 0 0.479 .6
+==Point: 0.87762772831890712 0 0.47934285275342808
+==Param: 0.49990578239977856
+==Dist: 0.0007152557954264938
+~~~~~
+
+@subsubsection occt_draw_9_1_15 projface
Syntax:
~~~~~
== = proj X = -116 Y = -45 Z = 0
~~~~~
-@subsubsection occt_draw_9_1_15 scaleshape
+@subsubsection occt_draw_9_1_16 scaleshape
Syntax:
~~~~~
scaleshape r a_1 0.8
~~~~~
-@subsubsection occt_draw_9_1_16 settolerance
+@subsubsection occt_draw_9_1_17 settolerance
Syntax:
~~~~~
settolerance a 0.001
~~~~~
-@subsubsection occt_draw_9_1_17 splitface
+@subsubsection occt_draw_9_1_18 splitface
Syntax:
~~~~~
==> Status: DONE1
~~~~~
-@subsubsection occt_draw_9_1_18 statshape
+@subsubsection occt_draw_9_1_19 statshape
Syntax:
~~~~~
==> 34 bspsur: BSplineSurface
~~~~~
-@subsubsection occt_draw_9_1_19 tolerance
+@subsubsection occt_draw_9_1_20 tolerance
Syntax:
~~~~~
~~~~~
+@section occt_draw_12 Simple vector algebra and measurements
+
+This section contains description of auxiliary commands that can be useful for simple calculations and manipulations needed when analyzing complex models.
+
+@subsection occt_draw_12_1 Vector algebra commands
+
+This section describes commands providing simple calculations with 2D and 3D vectors. The vector is represented by a TCL list of double values (coordinates). The commands get input vector coordinates from the command line as distinct values. So, if you have a vector stored in a variable you need to use *eval* command as a prefix, for example, to compute the magnitude of cross products of two vectors given by 3 points the following commands can be used:
+~~~~~{.cpp}
+Draw[10]> set vec1 [vec 12 28 99 12 58 99]
+0 30 0
+Draw[13]> set vec2 [vec 12 28 99 16 21 89]
+4 -7 -10
+Draw[14]> set cross [eval cross $vec1 $vec2]
+-300 0 -120
+Draw[15]> eval module $cross
+323.10988842807024
+~~~~~
+
+@subsubsection occt_draw_12_1_1 vec
+
+Syntax:
+~~~~~
+vec <x1> <y1> <z1> <x2> <y2> <z2>
+~~~~~
+
+Returns coordinates of vector between two 3D points.
+
+Example:
+~~~~~{.cpp}
+vec 1 2 3 6 5 4
+~~~~~
+
+@subsubsection occt_draw_12_1_2 2dvec
+
+Syntax:
+~~~~~
+2dvec <x1> <y1> <x2> <y2>
+~~~~~
+
+Returns coordinates of vector between two 2D points.
+
+Example:
+~~~~~{.cpp}
+2dvec 1 2 4 3
+~~~~~
+
+@subsubsection occt_draw_12_1_3 pln
+
+Syntax:
+~~~~~
+pln <x1> <y1> <z1> <x2> <y2> <z2> <x3> <y3> <z3>
+~~~~~
+
+Returns plane built on three points. A plane is represented by 6 double values: coordinates of the origin point and the normal directoin.
+
+Example:
+~~~~~{.cpp}
+pln 1 2 3 6 5 4 9 8 7
+~~~~~
+
+@subsubsection occt_draw_12_1_4 module
+
+Syntax:
+~~~~~
+module <x> <y> <z>
+~~~~~
+
+Returns module of a vector.
+
+Example:
+~~~~~{.cpp}
+module 1 2 3
+~~~~~
+
+@subsubsection occt_draw_12_1_5 2dmodule
+
+Syntax:
+~~~~~
+2dmodule <x> <y>
+~~~~~
+
+Returns module of a 2D vector.
+
+Example:
+~~~~~{.cpp}
+2dmodule 1 2
+~~~~~
+
+@subsubsection occt_draw_12_1_6 norm
+
+Syntax:
+~~~~~
+norm <x> <y> <z>
+~~~~~
+
+Returns unified vector from a given 3D vector.
+
+Example:
+~~~~~{.cpp}
+norm 1 2 3
+~~~~~
+
+@subsubsection occt_draw_12_1_7 2dnorm
+
+Syntax:
+~~~~~
+2dnorm <x> <y>
+~~~~~
+
+Returns unified vector from a given 2D vector.
+
+Example:
+~~~~~{.cpp}
+2dnorm 1 2
+~~~~~
+
+@subsubsection occt_draw_12_1_8 inverse
+
+Syntax:
+~~~~~
+inverse <x> <y> <z>
+~~~~~
+
+Returns inversed 3D vector.
+
+Example:
+~~~~~{.cpp}
+inverse 1 2 3
+~~~~~
+
+@subsubsection occt_draw_12_1_9 2dinverse
+
+Syntax:
+~~~~~
+2dinverse <x> <y>
+~~~~~
+
+Returns inversed 2D vector.
+
+Example:
+~~~~~{.cpp}
+2dinverse 1 2
+~~~~~
+
+@subsubsection occt_draw_12_1_10 2dort
+
+Syntax:
+~~~~~
+2dort <x> <y>
+~~~~~
+
+Returns 2D vector rotated on 90 degrees.
+
+Example:
+~~~~~{.cpp}
+2dort 1 2
+~~~~~
+
+@subsubsection occt_draw_12_1_11 distpp
+
+Syntax:
+~~~~~
+distpp <x1> <y1> <z1> <x2> <y2> <z2>
+~~~~~
+
+Returns distance between two 3D points.
+
+Example:
+~~~~~{.cpp}
+distpp 1 2 3 4 5 6
+~~~~~
+
+@subsubsection occt_draw_12_1_12 2ddistpp
+
+Syntax:
+~~~~~
+2ddistpp <x1> <y1> <x2> <y2>
+~~~~~
+
+Returns distance between two 2D points.
+
+Example:
+~~~~~{.cpp}
+2ddistpp 1 2 3 4
+~~~~~
+
+@subsubsection occt_draw_12_1_13 distplp
+
+Syntax:
+~~~~~
+distplp <x0> <y0> <z0> <nx> <ny> <nz> <xp> <yp> <zp>
+~~~~~
+
+Returns distance between plane defined by point and normal direction and another point.
+
+Example:
+~~~~~{.cpp}
+distplp 0 0 0 0 0 1 5 6 7
+~~~~~
+
+@subsubsection occt_draw_12_1_14 distlp
+
+Syntax:
+~~~~~
+distlp <x0> <y0> <z0> <dx> <dy> <dz> <xp> <yp> <zp>
+~~~~~
+
+Returns distance between 3D line defined by point and direction and another point.
+
+Example:
+~~~~~{.cpp}
+distlp 0 0 0 1 0 0 5 6 7
+~~~~~
+
+@subsubsection occt_draw_12_1_15 2ddistlp
+
+Syntax:
+~~~~~
+2ddistlp <x0> <y0> <dx> <dy> <xp> <yp>
+~~~~~
+
+Returns distance between 2D line defined by point and direction and another point.
+
+Example:
+~~~~~{.cpp}
+2ddistlp 0 0 1 0 5 6
+~~~~~
+
+@subsubsection occt_draw_12_1_16 distppp
+
+Syntax:
+~~~~~
+distppp <x1> <y1> <z1> <x2> <y2> <z2> <x3> <y3> <z3>
+~~~~~
+
+Returns deviation of point (x2,y2,z2) from segment defined by points (x1,y1,z1) and (x3,y3,z3).
+
+Example:
+~~~~~{.cpp}
+distppp 0 0 0 1 1 0 2 0 0
+~~~~~
+
+@subsubsection occt_draw_12_1_17 2ddistppp
+
+Syntax:
+~~~~~
+2ddistppp <x1> <y1> <x2> <y2> <x3> <y3>
+~~~~~
+
+Returns deviation of point (x2,y2) from segment defined by points (x1,y1) and (x3,y3). The result is a signed value. It is positive if the point (x2,y2) is on the left side of the segment, and negative otherwise.
+
+Example:
+~~~~~{.cpp}
+2ddistppp 0 0 1 -1 2 0
+~~~~~
+
+@subsubsection occt_draw_12_1_18 barycen
+
+Syntax:
+~~~~~
+barycen <x1> <y1> <z1> <x2> <y2> <z2> <par>
+~~~~~
+
+Returns point of a given parameter between two 3D points.
+
+Example:
+~~~~~{.cpp}
+barycen 0 0 0 1 1 1 0.3
+~~~~~
+
+@subsubsection occt_draw_12_1_19 2dbarycen
+
+Syntax:
+~~~~~
+2dbarycen <x1> <y1> <x2> <y2> <par>
+~~~~~
+
+Returns point of a given parameter between two 2D points.
+
+Example:
+~~~~~{.cpp}
+2dbarycen 0 0 1 1 0.3
+~~~~~
+
+@subsubsection occt_draw_12_1_20 cross
+
+Syntax:
+~~~~~
+cross <x1> <y1> <z1> <x2> <y2> <z2>
+~~~~~
+
+Returns cross product of two 3D vectors.
+
+Example:
+~~~~~{.cpp}
+cross 1 0 0 0 1 0
+~~~~~
+
+@subsubsection occt_draw_12_1_21 2dcross
+
+Syntax:
+~~~~~
+2dcross <x1> <y1> <x2> <y2>
+~~~~~
+
+Returns cross product of two 2D vectors.
+
+Example:
+~~~~~{.cpp}
+2dcross 1 0 0 1
+~~~~~
+
+@subsubsection occt_draw_12_1_22 dot
+
+Syntax:
+~~~~~
+dot <x1> <y1> <z1> <x2> <y2> <z2>
+~~~~~
+
+Returns scalar product of two 3D vectors.
+
+Example:
+~~~~~{.cpp}
+dot 1 0 0 0 1 0
+~~~~~
+
+@subsubsection occt_draw_12_1_23 2ddot
+
+Syntax:
+~~~~~
+2ddot <x1> <y1> <x2> <y2>
+~~~~~
+
+Returns scalar product of two 2D vectors.
+
+Example:
+~~~~~{.cpp}
+2ddot 1 0 0 1
+~~~~~
+
+@subsubsection occt_draw_12_1_24 scale
+
+Syntax:
+~~~~~
+scale <x> <y> <z> <factor>
+~~~~~
+
+Returns 3D vector multiplied by scalar.
+
+Example:
+~~~~~{.cpp}
+scale 1 0 0 5
+~~~~~
+
+@subsubsection occt_draw_12_1_25 2dscale
+
+Syntax:
+~~~~~
+2dscale <x> <y> <factor>
+~~~~~
+
+Returns 2D vector multiplied by scalar.
+
+Example:
+~~~~~{.cpp}
+2dscale 1 0 5
+~~~~~
+
+@subsection occt_draw_12_2 Measurements commands
+
+This section describes commands that make possible to provide measurements on a model.
+
+@subsubsection occt_draw_12_2_1 pnt
+
+Syntax:
+~~~~~
+pnt <object>
+~~~~~
+
+Returns coordinates of point in the given Draw variable. Object can be of type point or vertex. Actually this command is built up from the commands @ref occt_draw_7_2_1a "mkpoint" and @ref occt_draw_6_6_1 "coord".
+
+Example:
+~~~~~{.cpp}
+vertex v 0 1 0
+pnt v
+~~~~~
+
+@subsubsection occt_draw_12_2_2 pntc
+
+Syntax:
+~~~~~
+pntc <curv> <par>
+~~~~~
+
+Returns coordinates of point on 3D curve with given parameter. Actually this command is based on the command @ref occt_draw_6_6_2 "cvalue".
+
+Example:
+~~~~~{.cpp}
+circle c 0 0 0 10
+pntc c [dval pi/2]
+~~~~~
+
+@subsubsection occt_draw_12_2_3 2dpntc
+
+Syntax:
+~~~~~
+2dpntc <curv2d> <par>
+~~~~~
+
+Returns coordinates of point on 2D curve with given parameter. Actually this command is based on the command @ref occt_draw_6_6_2 "2dcvalue".
+
+Example:
+~~~~~{.cpp}
+circle c 0 0 10
+2dpntc c [dval pi/2]
+~~~~~
+
+@subsubsection occt_draw_12_2_4 pntsu
+
+Syntax:
+~~~~~
+pntsu <surf> <u> <v>
+~~~~~
+
+Returns coordinates of point on surface with given parameters. Actually this command is based on the command @ref occt_draw_6_6_3 "svalue".
+
+Example:
+~~~~~{.cpp}
+cylinder s 10
+pntsu s [dval pi/2] 5
+~~~~~
+
+@subsubsection occt_draw_12_2_5 pntcons
+
+Syntax:
+~~~~~
+pntcons <curv2d> <surf> <par>
+~~~~~
+
+Returns coordinates of point on surface defined by point on 2D curve with given parameter. Actually this command is based on the commands @ref occt_draw_6_6_2 "2dcvalue" and @ref occt_draw_6_6_3 "svalue".
+
+Example:
+~~~~~{.cpp}
+line c 0 0 1 0
+cylinder s 10
+pntcons c s [dval pi/2]
+~~~~~
+
+@subsubsection occt_draw_12_2_6 drseg
+
+Syntax:
+~~~~~
+drseg <name> <x1> <y1> <z1> <x2> <y2> <z2>
+~~~~~
+
+Creates a linear segment between two 3D points. The new object is given the *name*. The object is drawn in the axonometric view.
+
+Example:
+~~~~~{.cpp}
+drseg s 0 0 0 1 0 0
+~~~~~
+
+@subsubsection occt_draw_12_2_7 2ddrseg
+
+Syntax:
+~~~~~
+2ddrseg <name> <x1> <y1> <x2> <y2>
+~~~~~
+
+Creates a linear segment between two 2D points. The new object is given the *name*. The object is drawn in the 2D view.
+
+Example:
+~~~~~{.cpp}
+2ddrseg s 0 0 1 0
+~~~~~
+
+@subsubsection occt_draw_12_2_8 mpick
+
+Syntax:
+~~~~~
+mpick
+~~~~~
+
+Prints in the console the coordinates of a point clicked by mouse in a view (axonometric or 2D). This command will wait for mouse click event in a view.
+
+Example:
+~~~~~{.cpp}
+mpick
+~~~~~
+
+@subsubsection occt_draw_12_2_9 mdist
+
+Syntax:
+~~~~~
+mdist
+~~~~~
+
+Prints in the console the distance between two points clicked by mouse in a view (axonometric or 2D). This command will wait for two mouse click events in a view.
+
+Example:
+~~~~~{.cpp}
+mdist
+~~~~~
+
@section occt_draw_11 Extending Test Harness with custom commands