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