File: bug24817

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (141 lines) | stat: -rw-r--r-- 3,546 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
puts "========"
puts "CR24817"
puts "========"
puts ""
#########################################
## Can not sew two circular faces in non-manifold mode
#########################################

# Create first face
circle c 0 1 0 1
trim c c 0.5*pi 1.5*pi
mkedge e1 c
line l 0 0 0 0 1 0
trim l l 0 2
mkedge e2 l
wire w e1 e2
mkplane plane1 w

# Create second face
circle c 0 1 0 1
trim c c 1.5*pi 2.5*pi
mkedge e1 c
line l 0 0 0 0 1 0
trim l l 0 2
mkedge e2 l
wire w e1 e2
mkplane plane2 w

# Create third face
circle c 0 1 0 1 0 0 1
trim c c 1.5*pi 2.5*pi
mkedge e1 c
line l 0 0 0 0 1 0
trim l l 0 2
mkedge e2 l
wire w e1 e2
mkplane plane3 w

# Sew faces
sewing sr1 plane1 plane2 +n
sewing sr2 plane1 plane2 plane3 +n

#
set list1 [nbshapes sr1]
regexp {VERTEX +: +([-0-9.+eE]+)} ${list1} full nb_v1
regexp {EDGE +: +([-0-9.+eE]+)} ${list1} full nb_e1
regexp {WIRE +: +([-0-9.+eE]+)} ${list1} full nb_w1
regexp {FACE +: +([-0-9.+eE]+)} ${list1} full nb_f1
regexp {SHELL +: +([-0-9.+eE]+)} ${list1} full nb_sh1
regexp {SOLID +: +([-0-9.+eE]+)} ${list1} full nb_sol1
regexp {COMPSOLID +: +([-0-9.+eE]+)} ${list1} full nb_compsol1
regexp {COMPOUND +: +([-0-9.+eE]+)} ${list1} full nb_compound1
regexp {SHAPE +: +([-0-9.+eE]+)} ${list1} full nb_shape1

regexp {Mass +: +([-0-9.+eE]+)} [sprops sr1] full square1

set square1_good 3.14159
set nb_v1_good 2
set nb_e1_good 3
set nb_w1_good 2
set nb_f1_good 2
set nb_sh1_good 1
set nb_sol1_good 0
set nb_compsol1_good 0
set nb_compound1_good 0
set nb_shape1_good 10

if { ${nb_v1} != ${nb_v1_good} 
    || ${nb_e1} != ${nb_e1_good} 
    || ${nb_w1} != ${nb_w1_good} 
    || ${nb_f1} != ${nb_f1_good} 
    || ${nb_sh1} != ${nb_sh1_good} 
    || ${nb_sol1} != ${nb_sol1_good} 
    || ${nb_compsol1} != ${nb_compsol1_good} 
    || ${nb_compound1} != ${nb_compound1_good} 
    || ${nb_shape1} != ${nb_shape1_good} } {
    puts "Error 1: Number of shapes is faulty"
}

if { ${square1} != ${square1_good} } {
   puts "Error 2: Square is not valid"
}

clear
smallview
donly sr1
fit
xwd $imagedir/${test_image}_1.png

#
set list2 [nbshapes sr2]
regexp {VERTEX +: +([-0-9.+eE]+)} ${list2} full nb_v2
regexp {EDGE +: +([-0-9.+eE]+)} ${list2} full nb_e2
regexp {WIRE +: +([-0-9.+eE]+)} ${list2} full nb_w2
regexp {FACE +: +([-0-9.+eE]+)} ${list2} full nb_f2
regexp {SHELL +: +([-0-9.+eE]+)} ${list2} full nb_sh2
regexp {SOLID +: +([-0-9.+eE]+)} ${list2} full nb_sol2
regexp {COMPSOLID +: +([-0-9.+eE]+)} ${list2} full nb_compsol2
regexp {COMPOUND +: +([-0-9.+eE]+)} ${list2} full nb_compound2
regexp {SHAPE +: +([-0-9.+eE]+)} ${list2} full nb_shape2

regexp {Mass +: +([-0-9.+eE]+)} [sprops sr2] full square2

set square2_good 4.71239
set nb_v2_good 2
set nb_e2_good 4
set nb_w2_good 3
set nb_f2_good 3
set nb_sh2_good 1
set nb_sol2_good 0
set nb_compsol2_good 0
set nb_compound2_good 0
set nb_shape2_good 13

if { ${nb_v2} != ${nb_v2_good} 
    || ${nb_e2} != ${nb_e2_good} 
    || ${nb_w2} != ${nb_w2_good} 
    || ${nb_f2} != ${nb_f2_good} 
    || ${nb_sh2} != ${nb_sh2_good} 
    || ${nb_sol2} != ${nb_sol2_good} 
    || ${nb_compsol2} != ${nb_compsol2_good} 
    || ${nb_compound2} != ${nb_compound2_good} 
    || ${nb_shape2} != ${nb_shape2_good} } {
    puts "Error 3: Number of shapes is faulty"
}

if { ${square2} != ${square2_good} } {
   puts "Error 4: Square is not valid"
}

donly sr2
fit
xwd $imagedir/${test_image}_2.png

checkmaxtol sr1 2.0000000024492936e-007
checknbshapes sr1 -shell 1
checkfreebounds sr1 2

checkmaxtol sr2 3.0000000042603855e-007
checknbshapes sr2 -shell 1
checkfreebounds sr2 0