712879c8 |
1 | puts "========" |
2 | puts "0027383: Modeling - improve handling of regularity on edges" |
3 | puts "========" |
4 | puts "" |
5 | ################################################################# |
6 | # Check regularity setting on edges between rotated or mirrored half spheres |
7 | ################################################################# |
8 | |
9 | pload MODELING |
10 | psphere s1 10 180 |
11 | psphere s2 10 180 |
12 | explode s1 f |
13 | explode s2 f |
14 | tmirror s2_1 0 0 0 0 1 0 |
15 | trotate s2_1 0 0 0 0 1 0 45 |
16 | sewing r s1_1 s2_1 |
17 | encoderegularity r |
18 | |
19 | explode r F |
20 | set edges [explode r_1 E] |
21 | set len 0 |
22 | foreach e ${edges} { |
23 | # check for degenerated edge |
24 | set e_props [lprops $e 1.e-4] |
25 | regexp {Mass : +([0-9.+-eE]+)} $e_props full len |
26 | |
27 | if { [expr abs($len) > 1.e-7] } { |
28 | set cont "G2" |
29 | } else { |
30 | # degenerated edges have always C0 continuity |
31 | set cont "C0" |
32 | } |
33 | |
34 | if { ! [regexp "${cont}" [getedgeregularity $e r_1 r_2]] } { |
35 | puts "Error: Invalid regularity of the edge, expected ${cont}" |
36 | } |
37 | } |
38 | |
39 | # make image in HLR mode as illustration |
40 | pload VISUALIZATION |
41 | vdisplay r |
42 | vfit |
43 | vhlr on |
44 | vdump ${imagedir}/${test_image}.png |