0e94a94e |
1 | |
2 | puts "============" |
3 | puts "BUC60942" |
4 | puts "============" |
5 | ############################################################### |
6 | ## SplitShape algorithm modifies original shape (increases vertex tolerance of a plitting edge). |
7 | ############################################################### |
8 | |
9 | restore [locate_data_file BUC60942_splitshape.brep] c |
10 | explode c |
352ffd73 |
11 | checkshape c_1 |
12 | checkshape c_2 |
0e94a94e |
13 | |
14 | renamevar c_1 f |
15 | renamevar c_2 w |
16 | |
17 | set tol1 [maxtolerance w] |
18 | regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol1 full MaxEdgeTol1 |
19 | regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol1 full MaxVertexTol1 |
20 | |
21 | splitshape result f f w |
22 | |
23 | set tol2 [maxtolerance w] |
24 | regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol2 full MaxEdgeTol2 |
25 | regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol2 full MaxVertexTol2 |
26 | |
27 | |
28 | if { $MaxEdgeTol1 < $MaxEdgeTol2 || $MaxVertexTol1 < $MaxVertexTol1 } { |
29 | puts "Faulty BUC60942: max tolerance of the input wire has been increased by about 10 times." |
30 | } else { |
31 | puts "BUC60942 OK: Tolerance of shape is correct" |
32 | } |
33 | |
34 | set square 37.7032 |
35 | set 2dviewer 0 |