0026498: BRepOffsetAPI_MakeOffset causes segmentation fault
[occt.git] / tests / bugs / vis / bug24351_4
CommitLineData
1d7ca641 1puts "============"
2puts "CR24351"
3puts "============"
4puts ""
5#######################################################################
6# Test AIS angle dimensions: label position and arrow orientation
7#######################################################################
8pload VISUALIZATION
9
10vinit
11vright
12
13set hpos "left hcenter right"
14set vpos "above vcenter below"
15
16# ---------------------------------------------------------------------
17# create dimensions with different arrow orientation and fit algorithm
18# ---------------------------------------------------------------------
19
fe83e1ea 20# test forced internal arrow orientation
1d7ca641 21vpoint angle1_p1 0 0 40
22vpoint angle1_p2 0 0 0
23vpoint angle1_p3 40 0 0
0499eb06 24vdimension ang1 -angle -shapes angle1_p1 angle1_p2 angle1_p3 -text 3d -plane zox -label hfit -flyout 40.0 -arrow internal
1d7ca641 25
fe83e1ea 26# test forced external arrow orientation
1d7ca641 27vpoint angle2_p1 80 0 40
28vpoint angle2_p2 80 0 0
29vpoint angle2_p3 120 0 0
0499eb06 30vdimension ang2 -angle -shapes angle2_p1 angle2_p2 angle2_p3 -text 3d -plane zox -label hfit -flyout 40.0 -arrow external
1d7ca641 31
fe83e1ea 32# test that auto-fit for arrow places them externally for small geometry
33vpoint angle3_p1 0 0 100
1d7ca641 34vpoint angle3_p2 0 0 80
fe83e1ea 35vpoint angle3_p3 20 0 80
0499eb06 36vdimension ang3 -angle -shapes angle3_p1 angle3_p2 angle3_p3 -text 3d -plane zox -label hcenter -flyout 20.0 -arrow fit
fe83e1ea 37
38# test that auto-fit for text places the label externally for small geometry
39vpoint angle4_p1 85 0 100
40vpoint angle4_p2 85 0 85
41vpoint angle4_p3 100 0 85
0499eb06 42vdimension ang4 -angle -shapes angle4_p1 angle4_p2 angle4_p3 -text 3d -plane zox -label hfit -flyout 15.0 -arrow fit
1d7ca641 43
44vdisplay ang1 ang2 ang3 ang4
45vfit
46
47# ------------------------------------------------
48# create dimension with different label positions
49# ------------------------------------------------
50
51vinit Viewer2/View2
52vright
53
54set idx 0
55for {set r 0} {$r < 3} {incr r} {
56 for {set c 0} {$c < 3} {incr c} {
57
58 set point1 p_[expr "$idx * 3 + 0"]
59 set point2 p_[expr "$idx * 3 + 1"]
60 set point3 p_[expr "$idx * 3 + 2"]
61
62 vpoint $point1 [expr "60.0 * $c + 0"] 0.0 [expr "60.0 * $r + 40"]
63 vpoint $point2 [expr "60.0 * $c + 0"] 0.0 [expr "60.0 * $r + 0"]
64 vpoint $point3 [expr "60.0 * $c + 40"] 0.0 [expr "60.0 * $r + 0"]
65
66 set dimension r_$idx
67
0499eb06 68 vdimension $dimension -angle -shapes $point1 $point2 $point3 -text 3d -plane zox -label [lindex $hpos $c] [lindex $vpos $r] -arrow external -flyout 40.0
1d7ca641 69 vdisplay $dimension
70
71 incr idx
72 }
73}
74vfit
75
76set only_screen 1