0024881: Wrong status returned by ShapeFix_Wire::FixGaps3d () operation
[occt.git] / tests / bugs / heal / bug1642
CommitLineData
352ffd73 1puts "========================"
2puts " OCC1642 "
3puts "========================"
4puts ""
5###########################################################
6puts " ShapeFix_Wire::FixSelfIntersectingEdge does not remove a loop"
7###########################################################
8
9pload QAcommands
10cpulimit 2000
11
12restore [locate_data_file OCC1642.brep] shape
13
14set list [OCC1642 result FinalFace InitWare InitFace shape FixReorder FixDegenerated FixConnected FixSelfIntersection]
15
16set FixSelfIntersection [string last "FixSelfIntersection" $list]
17set Intersectingpt [string last "Intersecting pt :" $list]
18
19puts "FixSelfIntersection=${FixSelfIntersection}"
20puts "Intersectingpt=${Intersectingpt}"
21if { ${Intersectingpt} == -1} {
22 puts "Warning: There are not intersecting points"
23}
24
25set list [lprops result]
26regexp {Mass +: +([-0-9.+eE]+)} $list full pcurve_length
27
28set good_pcurve_length 3880.52
29set percent_max 0.1
30set percent [expr abs(${pcurve_length} - ${good_pcurve_length}) / double(${good_pcurve_length}) * 100.]
31
32puts "good_pcurve_length = ${good_pcurve_length}"
33puts "pcurve_length = ${pcurve_length}"
34puts "percent = ${percent}"
35
36if {${percent} > ${percent_max}} {
37 puts "OCC1642 Faulty length: function FixShape works WRONGLY !!"
38} else {
39 puts "OCC1642 length: function FixShape works CORRECTLY"
40}
41
42if { ${Intersectingpt} > ${FixSelfIntersection} } {
43 puts "OCC1642 Faulty"
44} else {
45 puts "OCC1642 OK"
46}
47
48set 2dviewer 0
49