0025270: OCCT fails to calculate extrema between extruded surface and line
[occt.git] / tests / bugs / modalg_5 / bug24817
CommitLineData
5b14f800 1puts "========"
2puts "CR24817"
3puts "========"
4puts ""
5#########################################
6## Can not sew two circular faces in non-manifold mode
7#########################################
8
9# Create first face
10circle c 0 1 0 1
11trim c c 0.5*pi 1.5*pi
12mkedge e1 c
13line l 0 0 0 0 1 0
14trim l l 0 2
15mkedge e2 l
16wire w e1 e2
17mkplane plane1 w
18
19# Create second face
20circle c 0 1 0 1
21trim c c 1.5*pi 2.5*pi
22mkedge e1 c
23line l 0 0 0 0 1 0
24trim l l 0 2
25mkedge e2 l
26wire w e1 e2
27mkplane plane2 w
28
29# Create third face
30circle c 0 1 0 1 0 0 1
31trim c c 1.5*pi 2.5*pi
32mkedge e1 c
33line l 0 0 0 0 1 0
34trim l l 0 2
35mkedge e2 l
36wire w e1 e2
37mkplane plane3 w
38
39# Sew faces
40sewing sr1 plane1 plane2 +n
41sewing sr2 plane1 plane2 plane3 +n
42
43#
44set list1 [nbshapes sr1]
45regexp {VERTEX +: +([-0-9.+eE]+)} ${list1} full nb_v1
46regexp {EDGE +: +([-0-9.+eE]+)} ${list1} full nb_e1
47regexp {WIRE +: +([-0-9.+eE]+)} ${list1} full nb_w1
48regexp {FACE +: +([-0-9.+eE]+)} ${list1} full nb_f1
49regexp {SHELL +: +([-0-9.+eE]+)} ${list1} full nb_sh1
50regexp {SOLID +: +([-0-9.+eE]+)} ${list1} full nb_sol1
51regexp {COMPSOLID +: +([-0-9.+eE]+)} ${list1} full nb_compsol1
52regexp {COMPOUND +: +([-0-9.+eE]+)} ${list1} full nb_compound1
53regexp {SHAPE +: +([-0-9.+eE]+)} ${list1} full nb_shape1
54
55regexp {Mass +: +([-0-9.+eE]+)} [sprops sr1] full square1
56
57set square1_good 3.14159
58set nb_v1_good 2
59set nb_e1_good 3
60set nb_w1_good 2
61set nb_f1_good 2
62set nb_sh1_good 1
63set nb_sol1_good 0
64set nb_compsol1_good 0
65set nb_compound1_good 0
66set nb_shape1_good 10
67
68if { ${nb_v1} != ${nb_v1_good}
69 || ${nb_e1} != ${nb_e1_good}
70 || ${nb_w1} != ${nb_w1_good}
71 || ${nb_f1} != ${nb_f1_good}
72 || ${nb_sh1} != ${nb_sh1_good}
73 || ${nb_sol1} != ${nb_sol1_good}
74 || ${nb_compsol1} != ${nb_compsol1_good}
75 || ${nb_compound1} != ${nb_compound1_good}
76 || ${nb_shape1} != ${nb_shape1_good} } {
77 puts "Error 1: Number of shapes is faulty"
78}
79
80if { ${square1} != ${square1_good} } {
81 puts "Error 2: Square is not valid"
82}
83
84clear
85smallview
86donly sr1
87fit
88xwd $imagedir/${test_image}_1.png
89
90#
91set list2 [nbshapes sr2]
92regexp {VERTEX +: +([-0-9.+eE]+)} ${list2} full nb_v2
93regexp {EDGE +: +([-0-9.+eE]+)} ${list2} full nb_e2
94regexp {WIRE +: +([-0-9.+eE]+)} ${list2} full nb_w2
95regexp {FACE +: +([-0-9.+eE]+)} ${list2} full nb_f2
96regexp {SHELL +: +([-0-9.+eE]+)} ${list2} full nb_sh2
97regexp {SOLID +: +([-0-9.+eE]+)} ${list2} full nb_sol2
98regexp {COMPSOLID +: +([-0-9.+eE]+)} ${list2} full nb_compsol2
99regexp {COMPOUND +: +([-0-9.+eE]+)} ${list2} full nb_compound2
100regexp {SHAPE +: +([-0-9.+eE]+)} ${list2} full nb_shape2
101
102regexp {Mass +: +([-0-9.+eE]+)} [sprops sr2] full square2
103
104set square2_good 4.71239
105set nb_v2_good 2
106set nb_e2_good 4
107set nb_w2_good 3
108set nb_f2_good 3
109set nb_sh2_good 1
110set nb_sol2_good 0
111set nb_compsol2_good 0
112set nb_compound2_good 0
113set nb_shape2_good 13
114
115if { ${nb_v2} != ${nb_v2_good}
116 || ${nb_e2} != ${nb_e2_good}
117 || ${nb_w2} != ${nb_w2_good}
118 || ${nb_f2} != ${nb_f2_good}
119 || ${nb_sh2} != ${nb_sh2_good}
120 || ${nb_sol2} != ${nb_sol2_good}
121 || ${nb_compsol2} != ${nb_compsol2_good}
122 || ${nb_compound2} != ${nb_compound2_good}
123 || ${nb_shape2} != ${nb_shape2_good} } {
124 puts "Error 3: Number of shapes is faulty"
125}
126
127if { ${square2} != ${square2_good} } {
128 puts "Error 4: Square is not valid"
129}
130
131donly sr2
132fit
133xwd $imagedir/${test_image}_2.png