9d32c463 |
1 | puts "============" |
2 | puts "OCC25890" |
3 | puts "============" |
4 | puts "" |
5 | ############################### |
7b5e532f |
6 | ## Intersection algorithm produces curves overlapped |
9d32c463 |
7 | ############################### |
8 | |
8dc56d0f |
9 | set ExpToler 1.5361108163989659e-007 |
10 | set ExpLen 5.036361740755879 |
11 | |
9d32c463 |
12 | restore [locate_data_file bug25890_f1.brep] f1 |
13 | restore [locate_data_file bug25890_f2.brep] f2 |
14 | |
8dc56d0f |
15 | set log [ bopcurves f1 f2 -2d ] |
9d32c463 |
16 | regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv |
17 | |
8dc56d0f |
18 | checkreal TolReached $Toler $ExpToler 0.0 0.1 |
19 | |
20 | if { ${NbCurv} != 1 } { |
21 | puts "Error : NbCurv is bad" |
22 | |
23 | set nbshapes_expected " |
24 | Number of shapes in shape |
25 | VERTEX : 0 |
26 | EDGE : 0 |
27 | WIRE : 0 |
28 | FACE : 0 |
29 | SHELL : 0 |
30 | SOLID : 0 |
31 | COMPSOLID : 0 |
32 | COMPOUND : 1 |
33 | SHAPE : 1 |
34 | " |
9d32c463 |
35 | |
8dc56d0f |
36 | set SumLen 0.0 |
37 | |
38 | # Check for overlapping |
39 | for {set i 1} {$i <= $NbCurv} {incr i} { |
40 | regexp "The +length+ c_$i +is +(\[-0-9.+eE\]+)" [ length c_$i ] full m |
41 | set SumLen [ expr $SumLen + $m] |
42 | for {set j [expr $i+1]} {$j <= $NbCurv} {incr j} { |
43 | puts " Check c_$i and c_$j" |
44 | mkedge e1 c_$i |
45 | mkedge e2 c_$j |
46 | bcommon rr e1 e2 |
47 | checknbshapes rr -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" |
48 | } |
9d32c463 |
49 | } |
8dc56d0f |
50 | |
51 | checkreal Length $SumLen $ExpLen 1.0e-7 0.0 |
52 | } else { |
53 | checklength c_1 -l $ExpLen |
9d32c463 |
54 | } |
8dc56d0f |
55 | |