0014531: Boolean Operation Algorithm fails
[occt.git] / tests / bugs / modalg_6 / bug27780
1 puts "============"
2 puts "OCC27780"
3 puts "============"
4 puts ""
5 ######################################################
6 # Face-face intersection produces 2D curve that has reversed derivative at its end
7 ######################################################
8
9 restore [locate_data_file buc60532a.brep] p 
10 restore [locate_data_file buc60532b.brep] t1
11 explode t1 f
12
13 bopcurves p t1_2 -2d -p 6.2406621764215551 0.23999999463558200 0.00034444887595448459 -5.0019657458625186
14
15 pcurve p
16 trim c c2d1_1 0 1
17 2dcvalue c 0 u0 v0
18 2dcvalue c 1 u1 v1 du dv
19 dset u01 u1-u0
20 dset v01 v1-v0
21 dset dot u01*du+v01*dv
22
23 if {[dval dot] < 0} {
24   puts "Error: p-curve has reversed direction at its end"
25 } else {
26   puts "OK: p-curve has correct direction at its end"
27 }
28
29 view 1 -2D- 728 450 400 400
30 don p_* c
31 2dfit
32
33 checkview -screenshot -2d -path ${imagedir}/${test_image}.png