0027991: Modeling Algorithms - BRepGProp_Face crashes on face without geometric surface
[occt.git] / tests / bugs / vis / bug26719_2
CommitLineData
7479f643 1puts "============"
2puts "CR26719"
3puts "============"
4puts ""
5
6##########################################################################################
7puts "Visualization - cannot pick zoom persistent object"
8##########################################################################################
9
10proc compareDepth {theInfo} {
11 set aInfoList [split $theInfo "\n"]
12 set aEntNb [llength $aInfoList]
13 set aDepths {}
14 for {set aEntIdx 0} {$aEntIdx < $aEntNb} {incr aEntIdx} {
15 set aBuff [lindex $aInfoList $aEntIdx]
16 set aStringArr [split $aBuff " "]
17 set aSize [llength $aStringArr]
18 for {set aIdx 0} {$aIdx < $aSize} {incr aIdx} {
19 set aItem [lindex $aBuff $aIdx]
20 if {[string compare $aItem "Depth:"] == 0} {
21 lappend aDepths [string trim [lindex $aBuff [expr $aIdx + 1]]]
22 }
23 }
24 }
25
26 set aDepth1 [lindex $aDepths 0]
27 set aDepth2 [lindex $aDepths 1]
28 set aDiff [expr $aDepth1 - $aDepth2]
29 if {[expr abs($aDiff)] > 0.55} {
30 puts "ERROR: the depths diff is bigger than adequate tolerance, see vstate output!"
31 }
32}
33
34pload VISUALIZATION MODELING
35
36vinit
37vtrihedron tri
38vpan 50 50
39
91d96372 40box b1 20.3 20.3 20.3
41box b2 20.3 20.3 20.3
7479f643 42box b3 150 150 150 100 100 100
43
44vpoint p1 200 200 200
45
46vdisplay b1 -trsfPers zoom -trsfPersPos 200 200 200
47vdisplay b2 -trsfPers zoom -trsfPersPos 200 200 200
91d96372 48vsetlocation b2 -20.3 -20.3 -20.3
7479f643 49vdisplay b3
50
51vsetdispmode 1
52vaspects b1 -setColor RED
53vaspects b2 -setColor GREEN
54
55# setup the view in a way that front faces of b2 and b3 lie
56# almost on the same plane
57vviewparams -scale 0.99 -proj -0.04 -0.99 0.11
58vviewparams -up -0.58 0.16 0.8 -at 8.48 160.93 282.42
59vviewparams -eye -14.63 -379.49 343.06
60# check depth values
61vmoveto 230 280
62set anInfo [vstate -entities]
63compareDepth $anInfo
64vdump ${imagedir}/${casename}_1.png
65
66vmoveto 0 0
67
68# setup the view in a way that front faces of b1 and b3 lie
69# almost on the same plane
70vviewparams -scale 0.99 -proj -0.17 0.09 0.98
71vviewparams -up -0.1 0.99 -0.1 -at -49.98 231.47 25.2
72vviewparams -eye -142.03 280.17 559.45
73# check depth values
74vmoveto 276 110
75set anInfo [vstate -entities]
76compareDepth $anInfo
77vdump ${imagedir}/${casename}_2.png
78
5747059b 79checkview -screenshot -3d -path ${imagedir}/${test_image}.png