0030958: BRepOffsetAPI_ThruSections operation raises an exception while building...
[occt.git] / tests / bugs / modalg_4 / bug22646
1 puts "============"
2 puts "OCC22646"
3 puts "============"
4 puts ""
5 ######################################################
6 # Error in algorithms BRepOffsetAPI_ThruSections and BRepOffsetAPI_MakePipeShell: 
7 # sections with degenerated edges are processed in
8 ######################################################
9
10 set BugNumber OCC22646
11
12 restore [locate_data_file bug22646_source.brep] s1
13 restore [locate_data_file bug22646_scale_translate_xyz.brep] s2
14 restore [locate_data_file bug22646_scale_translate_yz.brep] s3
15 restore [locate_data_file bug22646_scale_translate_z.brep] s4
16
17 explode s1
18 explode s2
19 explode s3
20 explode s4
21
22 thrusections res2 0 0 s1_1 s2_1
23 savehistory hist
24
25 foreach s {s1_1 s2_1} {
26   foreach type {v e} {
27     foreach ss [explode $s $type] {
28       if {[catch { generated g2 hist $ss } catch_res]} {
29         puts "Error: Unable to get generated shapes"
30       }
31     }
32   }
33 }
34
35 thrusections res3 0 0 s1_1 s3_1
36 savehistory hist
37
38 foreach s {s1_1 s3_1} {
39   foreach type {v e} {
40     foreach ss [explode $s $type] {
41       if {[catch { generated g3 hist $ss } catch_res]} {
42         puts "Error: Unable to get generated shapes"
43       }
44     }
45   }
46 }
47
48 thrusections res4 0 0 s1_1 s4_1
49 savehistory hist
50
51 foreach s {s1_1 s4_1} {
52   foreach type {v e} {
53     foreach ss [explode $s $type] {
54       if {[catch { generated g4 hist $ss } catch_res]} {
55         puts "Error: Unable to get generated shapes"
56       }
57     }
58   }
59 }
60
61 vinit
62 vsetdispmode 1
63 vdisplay g2
64 vdisplay g3
65 vdisplay g4
66 vfit
67 checkview -screenshot -3d -path ${imagedir}/${test_image}.png