0024105: ShapeFix algorithm produces not correct result.
[occt.git] / tests / bugs / caf / bug21707
CommitLineData
b92d758f 1puts "=========="
2puts "OCC21707"
3puts "=========="
4puts ""
5##############################################################
6# Selection of Vertex returns Compound of vertexes
7##############################################################
8
9NewDocument D MDTV-Standard
10isos 12
11NewCommand D
12AddDriver D PntXYZ PntRLT Line3D Attach
13set Pnt1 [AddPoint D 0 0 0]
14ComputeFun D $Pnt1:1
15GetShape D $Pnt1:1:2 P1
16
17set Pnt2 [AddPoint D 0 200 0]
18ComputeFun D $Pnt2:1
19set Pnt3 [AddPoint D 200 200 0]
20ComputeFun D $Pnt3:1
21set Pnt4 [AddPoint D 200 0 0]
22ComputeFun D $Pnt4:1
23GetShape D $Pnt2:1:2 P2
24GetShape D $Pnt3:1:2 P3
25GetShape D $Pnt4:1:2 P4
26
27NewCommand D
28set Lin2 [ AddLine3D D 1 $Pnt1 $Pnt2 $Pnt3 $Pnt4]
29ComputeFun D $Lin2:1
30GetShape D $Lin2:1:2 L1
31
32NewCommand D
33AddDriver D Prism Box PTxyz
34set Prism [AddPrism D $Lin2 300 0]
35ComputeFun D $Prism:1
36GetShape D $Prism:1:2 Pr
37
38NewCommand D
39set B1 [AddBox D 400 140 600]
40ComputeFun D $B1:1
41GetShape D $B1:1:2 Box
42
43NewCommand D
44set FTr1 [PTranslateDXYZ D $B1 -100 -20 -100]
45ComputeFun D $FTr1
46GetShape D $B1:2:2 Box
47
48NewCommand D
49AddDriver D Comm Cut Fuse
50set Com1 [AddCommon D $Prism $B1]
51ComputeFun D $Com1
52GetShape D $Com1:2 Pr
53
54NewCommand D
55explode Pr E
56AddDriver D Attach Cyl
57set Sel1 [AttachShape D Pr_6 ${Prism} ${Prism} 0]
58set Cyl [AddCyl D 70 515 ${Sel1}]
59ComputeFun D $Cyl:1
60GetShape D $Cyl:1:2 CylS
61
62NewCommand D
63set FTr1 [PTranslateDXYZ D $Cyl -100 200 170]
64ComputeFun D $FTr1
65GetShape D $Cyl:2:2 CylS
66
67set Cut1 [AddCut D $Prism $Cyl]
68ComputeFun D $Cut1
69GetShape D $Cut1:2 Pr
70don Pr
71explode Pr V
72don Pr
73set Sel8 [AttachShape D Pr_8 ${Prism} ${Prism} 0]
74set Sel11 [AttachShape D Pr_10 ${Prism} ${Prism} 0]
75
76GetShape D $Cut1:2 result
77
78set nb_v_good 10
79set 2dviewer 0
80