5 #######################################################################
6 # Meshing of edge with minSize parameter leads to incorrect result
7 #######################################################################
9 proc xyzList {List N A B} {
11 for {set i 1} {$i <= $N} {incr i} {
13 set x [lindex $List [expr ($A + 0 + $B*$i) ]]
14 set y [lindex $List [expr ($A + 1 + $B*$i) ]]
15 set z [lindex $List [expr ($A + 2 + $B*$i) ]]
16 #puts "i=$i x=$x y=$y z=$z"
20 lappend ResultList $tmpList
25 restore [locate_data_file bug26533_aal2.brep] a
30 vdump ${imagedir}/${casename}_1.png
36 incmesh a 0.3 -min 0.06
38 vdump ${imagedir}/${casename}_2.png
42 regexp {Polygon3D with +([-0-9.+eE]+)} $log1 full Nodes1
44 set Index1 [lsearch -exact $log1 "Polygon3D"]
45 set Index1 [expr ($Index1 + 8)]
48 set RL1 [xyzList $log1 $Nodes1 $Index1 $B]
49 set Length1 [llength $RL1]
54 restore [locate_data_file bug26533_aal2.brep] a2
59 vdump ${imagedir}/${casename}_3.png
63 regexp {Polygon3D with +([-0-9.+eE]+)} $log2 full Nodes2
65 set Index2 [lsearch -exact $log2 "Polygon3D"]
66 set Index2 [expr ($Index2 + 8)]
68 set RL2 [xyzList $log2 $Nodes2 $Index2 $B]
69 set Length2 [llength $RL2]
71 # 3. Compare coordinates of Polygon3Dare
75 if {$Length1 != $Length2} {
76 puts "Error: Numbers of nodes are not equal"
78 puts "OK: Numbers of nodes are equal"
80 for {set i 0} {$i < $Length1} {incr i} {
81 set tmpList1 [lindex $RL1 $i]
82 set x1 [lindex $tmpList1 0]
83 set y1 [lindex $tmpList1 1]
84 set z1 [lindex $tmpList1 2]
85 #puts "x1=$x1 y1=$y1 z1=$z1"
87 set tmpList2 [lindex $RL2 $i]
88 set x2 [lindex $tmpList2 0]
89 set y2 [lindex $tmpList2 1]
90 set z2 [lindex $tmpList2 2]
91 #puts "x2=$x2 y2=$y2 z2=$z2"
97 if { [expr abs($x1 - $x2)] > $Tolerance } {
100 if { [expr abs($y1 - $y2)] > $Tolerance } {
103 if { [expr abs($z1 - $z2)] > $Tolerance } {
106 if { $xBad !=0 && $yBad !=0 && $zBad !=0 } {
108 set j [expr ($i + 1)]
109 puts "Following coordinates are not equal:"
110 puts "i=$j x1=$x1 y1=$y1 z1=$z1"
111 puts "i=$j x2=$x2 y2=$y2 z2=$z2"
117 puts "Error: Coordinates of Polygon3Dare are not equal"
119 puts "OK: Coordinates of Polygon3Dare are equal"