0026241: Sewing algorithm computes tolerance of joint vertex too rough
[occt.git] / tests / bugs / moddata_2 / bug42
1 puts "================"
2 puts "OCC42"
3 puts "================"
4 puts ""
5 ###############################################
6 ## BRepAlgo_Sewing does not sew attached shape with any tolerance.
7 ###############################################
8
9 pload XDE
10
11 # 1. retriesve shape
12 restore [locate_data_file OCC42.brep] sh 
13 checkshape sh
14
15 # 2. perform sewing
16 set toler 80
17 sewing result $toler sh
18
19 # 3. Verify result of sewing
20 checkshape result
21
22 # Retrieve free wires from result shape
23 catch { fbclose result $toler $toler } resOfCatch
24
25 # Amount of free open wires must be equal 0
26 set open_wires [explode result_o W]
27 if { [llength $open_wires] != 0} {
28    puts "Error : There are free open wires"
29 }
30
31 # Amount of free closed wires must be equal 1 
32 set closed_wires [explode result_c W]
33 if { [llength $closed_wires] != 1} {
34    puts "Error : Amount of free closed wires is not equal 1"
35 }
36
37 checkmaxtol result 0.20874930847108514
38 checknbshapes result -shell 1
39 checkfreebounds result 86
40
41 set 2dviewer 0
42